diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-24 11:01:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-24 11:01:10 -0400 |
commit | f13771187b9423b824f32518319f6da85d819003 (patch) | |
tree | c431cf16c286065a302d5f3fb43fc1abac7e4047 /fs/hfsplus/ioctl.c | |
parent | 15953654cc312429740fd58fb37a5a3d63a54376 (diff) | |
parent | 9f37af654fda88a8dcca74c785f6c20e52758866 (diff) |
Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing
* 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing:
uml: Pushdown the bkl from harddog_kern ioctl
sunrpc: Pushdown the bkl from sunrpc cache ioctl
sunrpc: Pushdown the bkl from ioctl
autofs4: Pushdown the bkl from ioctl
uml: Convert to unlocked_ioctls to remove implicit BKL
ncpfs: BKL ioctl pushdown
coda: Clean-up whitespace problems in pioctl.c
coda: BKL ioctl pushdown
drivers: Push down BKL into various drivers
isdn: Push down BKL into ioctl functions
scsi: Push down BKL into ioctl functions
dvb: Push down BKL into ioctl functions
smbfs: Push down BKL into ioctl function
coda/psdev: Remove BKL from ioctl function
um/mmapper: Remove BKL usage
sn_hwperf: Kill BKL usage
hfsplus: Push down BKL into ioctl function
Diffstat (limited to 'fs/hfsplus/ioctl.c')
-rw-r--r-- | fs/hfsplus/ioctl.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/fs/hfsplus/ioctl.c b/fs/hfsplus/ioctl.c index f457d2ca51ab..ac405f099026 100644 --- a/fs/hfsplus/ioctl.c +++ b/fs/hfsplus/ioctl.c | |||
@@ -17,14 +17,16 @@ | |||
17 | #include <linux/mount.h> | 17 | #include <linux/mount.h> |
18 | #include <linux/sched.h> | 18 | #include <linux/sched.h> |
19 | #include <linux/xattr.h> | 19 | #include <linux/xattr.h> |
20 | #include <linux/smp_lock.h> | ||
20 | #include <asm/uaccess.h> | 21 | #include <asm/uaccess.h> |
21 | #include "hfsplus_fs.h" | 22 | #include "hfsplus_fs.h" |
22 | 23 | ||
23 | int hfsplus_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, | 24 | long hfsplus_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) |
24 | unsigned long arg) | ||
25 | { | 25 | { |
26 | struct inode *inode = filp->f_path.dentry->d_inode; | ||
26 | unsigned int flags; | 27 | unsigned int flags; |
27 | 28 | ||
29 | lock_kernel(); | ||
28 | switch (cmd) { | 30 | switch (cmd) { |
29 | case HFSPLUS_IOC_EXT2_GETFLAGS: | 31 | case HFSPLUS_IOC_EXT2_GETFLAGS: |
30 | flags = 0; | 32 | flags = 0; |
@@ -38,8 +40,10 @@ int hfsplus_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, | |||
38 | case HFSPLUS_IOC_EXT2_SETFLAGS: { | 40 | case HFSPLUS_IOC_EXT2_SETFLAGS: { |
39 | int err = 0; | 41 | int err = 0; |
40 | err = mnt_want_write(filp->f_path.mnt); | 42 | err = mnt_want_write(filp->f_path.mnt); |
41 | if (err) | 43 | if (err) { |
44 | unlock_kernel(); | ||
42 | return err; | 45 | return err; |
46 | } | ||
43 | 47 | ||
44 | if (!is_owner_or_cap(inode)) { | 48 | if (!is_owner_or_cap(inode)) { |
45 | err = -EACCES; | 49 | err = -EACCES; |
@@ -85,9 +89,11 @@ int hfsplus_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, | |||
85 | mark_inode_dirty(inode); | 89 | mark_inode_dirty(inode); |
86 | setflags_out: | 90 | setflags_out: |
87 | mnt_drop_write(filp->f_path.mnt); | 91 | mnt_drop_write(filp->f_path.mnt); |
92 | unlock_kernel(); | ||
88 | return err; | 93 | return err; |
89 | } | 94 | } |
90 | default: | 95 | default: |
96 | unlock_kernel(); | ||
91 | return -ENOTTY; | 97 | return -ENOTTY; |
92 | } | 98 | } |
93 | } | 99 | } |