diff options
author | Frederic Weisbecker <fweisbec@gmail.com> | 2009-10-14 17:22:17 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2009-10-14 17:28:12 -0400 |
commit | 205cb37b89ab37db553907e5ac17962eec561804 (patch) | |
tree | 1ba8dcbef0112fbd0d77d28a317c950b11c19563 | |
parent | ac78a07893d24d95ff5f39d0433c25210f224f07 (diff) |
kill-the-bkl/reiserfs: definitely drop the bkl from reiserfs_ioctl()
The reiserfs ioctl path doesn't need the big kernel lock anymore , now
that the filesystem synchronizes through its own lock.
We can then turn reiserfs_ioctl() into an unlocked_ioctl callback.
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Jeff Mahoney <jeffm@suse.com>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Alexander Beregalov <a.beregalov@gmail.com>
Cc: Laurent Riffard <laurent.riffard@free.fr>
Cc: Thomas Gleixner <tglx@linutronix.de>
-rw-r--r-- | fs/reiserfs/dir.c | 2 | ||||
-rw-r--r-- | fs/reiserfs/file.c | 2 | ||||
-rw-r--r-- | fs/reiserfs/ioctl.c | 11 | ||||
-rw-r--r-- | include/linux/reiserfs_fs.h | 3 |
4 files changed, 6 insertions, 12 deletions
diff --git a/fs/reiserfs/dir.c b/fs/reiserfs/dir.c index 17f31ad379c8..c094f58c7448 100644 --- a/fs/reiserfs/dir.c +++ b/fs/reiserfs/dir.c | |||
@@ -20,7 +20,7 @@ const struct file_operations reiserfs_dir_operations = { | |||
20 | .read = generic_read_dir, | 20 | .read = generic_read_dir, |
21 | .readdir = reiserfs_readdir, | 21 | .readdir = reiserfs_readdir, |
22 | .fsync = reiserfs_dir_fsync, | 22 | .fsync = reiserfs_dir_fsync, |
23 | .ioctl = reiserfs_ioctl, | 23 | .unlocked_ioctl = reiserfs_ioctl, |
24 | #ifdef CONFIG_COMPAT | 24 | #ifdef CONFIG_COMPAT |
25 | .compat_ioctl = reiserfs_compat_ioctl, | 25 | .compat_ioctl = reiserfs_compat_ioctl, |
26 | #endif | 26 | #endif |
diff --git a/fs/reiserfs/file.c b/fs/reiserfs/file.c index 9f436668b7f8..da2dba082e2d 100644 --- a/fs/reiserfs/file.c +++ b/fs/reiserfs/file.c | |||
@@ -284,7 +284,7 @@ static ssize_t reiserfs_file_write(struct file *file, /* the file we are going t | |||
284 | const struct file_operations reiserfs_file_operations = { | 284 | const struct file_operations reiserfs_file_operations = { |
285 | .read = do_sync_read, | 285 | .read = do_sync_read, |
286 | .write = reiserfs_file_write, | 286 | .write = reiserfs_file_write, |
287 | .ioctl = reiserfs_ioctl, | 287 | .unlocked_ioctl = reiserfs_ioctl, |
288 | #ifdef CONFIG_COMPAT | 288 | #ifdef CONFIG_COMPAT |
289 | .compat_ioctl = reiserfs_compat_ioctl, | 289 | .compat_ioctl = reiserfs_compat_ioctl, |
290 | #endif | 290 | #endif |
diff --git a/fs/reiserfs/ioctl.c b/fs/reiserfs/ioctl.c index e30e8be09179..ace77451ceb1 100644 --- a/fs/reiserfs/ioctl.c +++ b/fs/reiserfs/ioctl.c | |||
@@ -20,9 +20,9 @@ | |||
20 | * 2) REISERFS_IOC_[GS]ETFLAGS, REISERFS_IOC_[GS]ETVERSION | 20 | * 2) REISERFS_IOC_[GS]ETFLAGS, REISERFS_IOC_[GS]ETVERSION |
21 | * 3) That's all for a while ... | 21 | * 3) That's all for a while ... |
22 | */ | 22 | */ |
23 | int reiserfs_ioctl(struct inode *inode, struct file *filp, unsigned int cmd, | 23 | long reiserfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg) |
24 | unsigned long arg) | ||
25 | { | 24 | { |
25 | struct inode *inode = filp->f_path.dentry->d_inode; | ||
26 | unsigned int flags; | 26 | unsigned int flags; |
27 | int err = 0; | 27 | int err = 0; |
28 | 28 | ||
@@ -132,9 +132,6 @@ setversion_out: | |||
132 | long reiserfs_compat_ioctl(struct file *file, unsigned int cmd, | 132 | long reiserfs_compat_ioctl(struct file *file, unsigned int cmd, |
133 | unsigned long arg) | 133 | unsigned long arg) |
134 | { | 134 | { |
135 | struct inode *inode = file->f_path.dentry->d_inode; | ||
136 | int ret; | ||
137 | |||
138 | /* These are just misnamed, they actually get/put from/to user an int */ | 135 | /* These are just misnamed, they actually get/put from/to user an int */ |
139 | switch (cmd) { | 136 | switch (cmd) { |
140 | case REISERFS_IOC32_UNPACK: | 137 | case REISERFS_IOC32_UNPACK: |
@@ -156,9 +153,7 @@ long reiserfs_compat_ioctl(struct file *file, unsigned int cmd, | |||
156 | return -ENOIOCTLCMD; | 153 | return -ENOIOCTLCMD; |
157 | } | 154 | } |
158 | 155 | ||
159 | ret = reiserfs_ioctl(inode, file, cmd, (unsigned long) compat_ptr(arg)); | 156 | return reiserfs_ioctl(file, cmd, (unsigned long) compat_ptr(arg)); |
160 | |||
161 | return ret; | ||
162 | } | 157 | } |
163 | #endif | 158 | #endif |
164 | 159 | ||
diff --git a/include/linux/reiserfs_fs.h b/include/linux/reiserfs_fs.h index a498d9266d8c..a05b4a20768d 100644 --- a/include/linux/reiserfs_fs.h +++ b/include/linux/reiserfs_fs.h | |||
@@ -2314,8 +2314,7 @@ __u32 r5_hash(const signed char *msg, int len); | |||
2314 | #define SPARE_SPACE 500 | 2314 | #define SPARE_SPACE 500 |
2315 | 2315 | ||
2316 | /* prototypes from ioctl.c */ | 2316 | /* prototypes from ioctl.c */ |
2317 | int reiserfs_ioctl(struct inode *inode, struct file *filp, | 2317 | long reiserfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg); |
2318 | unsigned int cmd, unsigned long arg); | ||
2319 | long reiserfs_compat_ioctl(struct file *filp, | 2318 | long reiserfs_compat_ioctl(struct file *filp, |
2320 | unsigned int cmd, unsigned long arg); | 2319 | unsigned int cmd, unsigned long arg); |
2321 | int reiserfs_unpack(struct inode *inode, struct file *filp); | 2320 | int reiserfs_unpack(struct inode *inode, struct file *filp); |