aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAndi Kleen <ak@suse.de>2008-02-06 04:40:10 -0500
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2008-02-06 13:41:20 -0500
commit14f9f7b28e9f4c2102337d45f8d324c004a57481 (patch)
treee2b2099e485a6a498bfe609cfb5ac57edc22ba28 /fs
parentf762e9054ff84aa90f037a49747ac61b36609d81 (diff)
BKL-removal: convert ext2 over to use unlocked_ioctl
I checked ext2_ioctl and could not find anything in there that would need the BKL. So convert it over to use unlocked_ioctl Signed-off-by: Andi Kleen <ak@suse.de> Cc: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext2/dir.c2
-rw-r--r--fs/ext2/ext2.h3
-rw-r--r--fs/ext2/file.c4
-rw-r--r--fs/ext2/ioctl.c12
4 files changed, 7 insertions, 14 deletions
diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c
index d868e26c15eb..8dededd80fe2 100644
--- a/fs/ext2/dir.c
+++ b/fs/ext2/dir.c
@@ -703,7 +703,7 @@ const struct file_operations ext2_dir_operations = {
703 .llseek = generic_file_llseek, 703 .llseek = generic_file_llseek,
704 .read = generic_read_dir, 704 .read = generic_read_dir,
705 .readdir = ext2_readdir, 705 .readdir = ext2_readdir,
706 .ioctl = ext2_ioctl, 706 .unlocked_ioctl = ext2_ioctl,
707#ifdef CONFIG_COMPAT 707#ifdef CONFIG_COMPAT
708 .compat_ioctl = ext2_compat_ioctl, 708 .compat_ioctl = ext2_compat_ioctl,
709#endif 709#endif
diff --git a/fs/ext2/ext2.h b/fs/ext2/ext2.h
index c87ae29c19cb..bb9948cdd50f 100644
--- a/fs/ext2/ext2.h
+++ b/fs/ext2/ext2.h
@@ -139,8 +139,7 @@ int __ext2_write_begin(struct file *file, struct address_space *mapping,
139 struct page **pagep, void **fsdata); 139 struct page **pagep, void **fsdata);
140 140
141/* ioctl.c */ 141/* ioctl.c */
142extern int ext2_ioctl (struct inode *, struct file *, unsigned int, 142extern long ext2_ioctl(struct file *, unsigned int, unsigned long);
143 unsigned long);
144extern long ext2_compat_ioctl(struct file *, unsigned int, unsigned long); 143extern long ext2_compat_ioctl(struct file *, unsigned int, unsigned long);
145 144
146/* namei.c */ 145/* namei.c */
diff --git a/fs/ext2/file.c b/fs/ext2/file.c
index c051798459a1..5f2fa9c36293 100644
--- a/fs/ext2/file.c
+++ b/fs/ext2/file.c
@@ -48,7 +48,7 @@ const struct file_operations ext2_file_operations = {
48 .write = do_sync_write, 48 .write = do_sync_write,
49 .aio_read = generic_file_aio_read, 49 .aio_read = generic_file_aio_read,
50 .aio_write = generic_file_aio_write, 50 .aio_write = generic_file_aio_write,
51 .ioctl = ext2_ioctl, 51 .unlocked_ioctl = ext2_ioctl,
52#ifdef CONFIG_COMPAT 52#ifdef CONFIG_COMPAT
53 .compat_ioctl = ext2_compat_ioctl, 53 .compat_ioctl = ext2_compat_ioctl,
54#endif 54#endif
@@ -65,7 +65,7 @@ const struct file_operations ext2_xip_file_operations = {
65 .llseek = generic_file_llseek, 65 .llseek = generic_file_llseek,
66 .read = xip_file_read, 66 .read = xip_file_read,
67 .write = xip_file_write, 67 .write = xip_file_write,
68 .ioctl = ext2_ioctl, 68 .unlocked_ioctl = ext2_ioctl,
69#ifdef CONFIG_COMPAT 69#ifdef CONFIG_COMPAT
70 .compat_ioctl = ext2_compat_ioctl, 70 .compat_ioctl = ext2_compat_ioctl,
71#endif 71#endif
diff --git a/fs/ext2/ioctl.c b/fs/ext2/ioctl.c
index 320b2cb3d4d2..b8ea11fee5c6 100644
--- a/fs/ext2/ioctl.c
+++ b/fs/ext2/ioctl.c
@@ -17,9 +17,9 @@
17#include <asm/uaccess.h> 17#include <asm/uaccess.h>
18 18
19 19
20int ext2_ioctl (struct inode * inode, struct file * filp, unsigned int cmd, 20long ext2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
21 unsigned long arg)
22{ 21{
22 struct inode *inode = filp->f_dentry->d_inode;
23 struct ext2_inode_info *ei = EXT2_I(inode); 23 struct ext2_inode_info *ei = EXT2_I(inode);
24 unsigned int flags; 24 unsigned int flags;
25 unsigned short rsv_window_size; 25 unsigned short rsv_window_size;
@@ -141,9 +141,6 @@ int ext2_ioctl (struct inode * inode, struct file * filp, unsigned int cmd,
141#ifdef CONFIG_COMPAT 141#ifdef CONFIG_COMPAT
142long ext2_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) 142long ext2_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
143{ 143{
144 struct inode *inode = file->f_path.dentry->d_inode;
145 int ret;
146
147 /* These are just misnamed, they actually get/put from/to user an int */ 144 /* These are just misnamed, they actually get/put from/to user an int */
148 switch (cmd) { 145 switch (cmd) {
149 case EXT2_IOC32_GETFLAGS: 146 case EXT2_IOC32_GETFLAGS:
@@ -161,9 +158,6 @@ long ext2_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
161 default: 158 default:
162 return -ENOIOCTLCMD; 159 return -ENOIOCTLCMD;
163 } 160 }
164 lock_kernel(); 161 return ext2_ioctl(file, cmd, (unsigned long) compat_ptr(arg));
165 ret = ext2_ioctl(inode, file, cmd, (unsigned long) compat_ptr(arg));
166 unlock_kernel();
167 return ret;
168} 162}
169#endif 163#endif