From: Rahul Deshmukh Date: Thu, 24 Dec 2009 09:04:11 +0000 (+0300) Subject: b=19808 : 2.6.29-fc11 patchless client support X-Git-Tag: 1.10.0.34~10 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=85052d60a64f3e1883406c5c693445612704a9ae b=19808 : 2.6.29-fc11 patchless client support Changes need to fix to compile on gcc 4.4 (fc11) i=tappro i=vladimir.saveliev --- diff --git a/libcfs/libcfs/module.c b/libcfs/libcfs/module.c index 2fff7fb..a5a8071 100644 --- a/libcfs/libcfs/module.c +++ b/libcfs/libcfs/module.c @@ -220,21 +220,12 @@ int libcfs_deregister_ioctl(struct libcfs_ioctl_handler *hand) } EXPORT_SYMBOL(libcfs_deregister_ioctl); -static int libcfs_ioctl(struct cfs_psdev_file *pfile, unsigned long cmd, void *arg) +static int libcfs_ioctl_int(struct cfs_psdev_file *pfile,unsigned long cmd, + void *arg, struct libcfs_ioctl_data *data) { - char buf[1024]; int err = -EINVAL; - struct libcfs_ioctl_data *data; ENTRY; - /* 'cmd' and permissions get checked in our arch-specific caller */ - - if (libcfs_ioctl_getdata(buf, buf + 800, (void *)arg)) { - CERROR("PORTALS ioctl: data error\n"); - RETURN(-EINVAL); - } - data = (struct libcfs_ioctl_data *)buf; - switch (cmd) { case IOC_LIBCFS_CLEAR_DEBUG: libcfs_debug_clear_buffer(); @@ -337,6 +328,32 @@ static int libcfs_ioctl(struct cfs_psdev_file *pfile, unsigned long cmd, void *a RETURN(err); } +static int libcfs_ioctl(struct cfs_psdev_file *pfile, unsigned long cmd, void *arg) +{ + char *buf; + struct libcfs_ioctl_data *data; + int err; + ENTRY; + + LIBCFS_ALLOC_GFP(buf, 1024, CFS_ALLOC_STD); + if (buf == NULL) + RETURN(-ENOMEM); + + /* 'cmd' and permissions get checked in our arch-specific caller */ + if (libcfs_ioctl_getdata(buf, buf + 800, (void *)arg)) { + CERROR("PORTALS ioctl: data error\n"); + GOTO(out, err = -EINVAL); + } + data = (struct libcfs_ioctl_data *)buf; + + err = libcfs_ioctl_int(pfile, cmd, arg, data); + +out: + LIBCFS_FREE(buf, 1024); + RETURN(err); +} + + struct cfs_psdev_ops libcfs_psdev_ops = { libcfs_psdev_open, libcfs_psdev_release, diff --git a/lustre/lmv/lmv_intent.c b/lustre/lmv/lmv_intent.c index cb1273b..32ccf75 100644 --- a/lustre/lmv/lmv_intent.c +++ b/lustre/lmv/lmv_intent.c @@ -552,7 +552,7 @@ int lmv_revalidate_slaves(struct obd_export *exp, struct ptlrpc_request **reqp, int master_lockm = 0; struct lustre_handle *lockh = NULL; struct ptlrpc_request *mreq = *reqp; - struct lustre_handle master_lockh; + struct lustre_handle master_lockh = { 0 }; struct md_op_data *op_data; struct ldlm_lock *lock; unsigned long size = 0;