diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2010-10-30 12:35:11 +0100 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2010-10-30 12:35:11 +0100 |
commit | 67577927e8d7a1f4b09b4992df640eadc6aacb36 (patch) | |
tree | 2e9efe6b5745965faf0dcc084d4613d9356263f9 /fs/coda/pioctl.c | |
parent | 6fe4c590313133ebd5dadb769031489ff178ece1 (diff) | |
parent | 51f00a471ce8f359627dd99aeac322947a0e491b (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Conflicts:
drivers/mtd/mtd_blkdevs.c
Merge Grant's device-tree bits so that we can apply the subsequent fixes.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'fs/coda/pioctl.c')
-rw-r--r-- | fs/coda/pioctl.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/fs/coda/pioctl.c b/fs/coda/pioctl.c index ca25d96d45c..2fd89b5c5c7 100644 --- a/fs/coda/pioctl.c +++ b/fs/coda/pioctl.c @@ -23,8 +23,6 @@ #include <linux/coda_fs_i.h> #include <linux/coda_psdev.h> -#include <linux/smp_lock.h> - /* pioctl ops */ static int coda_ioctl_permission(struct inode *inode, int mask); static long coda_pioctl(struct file *filp, unsigned int cmd, @@ -39,6 +37,7 @@ const struct inode_operations coda_ioctl_inode_operations = { const struct file_operations coda_ioctl_operations = { .owner = THIS_MODULE, .unlocked_ioctl = coda_pioctl, + .llseek = noop_llseek, }; /* the coda pioctl inode ops */ @@ -57,13 +56,9 @@ static long coda_pioctl(struct file *filp, unsigned int cmd, struct inode *target_inode = NULL; struct coda_inode_info *cnp; - lock_kernel(); - /* get the Pioctl data arguments from user space */ - if (copy_from_user(&data, (void __user *)user_data, sizeof(data))) { - error = -EINVAL; - goto out; - } + if (copy_from_user(&data, (void __user *)user_data, sizeof(data))) + return -EINVAL; /* * Look up the pathname. Note that the pathname is in @@ -75,13 +70,12 @@ static long coda_pioctl(struct file *filp, unsigned int cmd, error = user_lpath(data.path, &path); if (error) - goto out; - else - target_inode = path.dentry->d_inode; + return error; + + target_inode = path.dentry->d_inode; /* return if it is not a Coda inode */ if (target_inode->i_sb != inode->i_sb) { - path_put(&path); error = -EINVAL; goto out; } @@ -90,10 +84,7 @@ static long coda_pioctl(struct file *filp, unsigned int cmd, cnp = ITOC(target_inode); error = venus_pioctl(inode->i_sb, &(cnp->c_fid), cmd, &data); - - path_put(&path); - out: - unlock_kernel(); + path_put(&path); return error; } |