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>
This commit is contained in:
@@ -20,7 +20,7 @@ const struct file_operations reiserfs_dir_operations = {
|
|||||||
.read = generic_read_dir,
|
.read = generic_read_dir,
|
||||||
.readdir = reiserfs_readdir,
|
.readdir = reiserfs_readdir,
|
||||||
.fsync = reiserfs_dir_fsync,
|
.fsync = reiserfs_dir_fsync,
|
||||||
.ioctl = reiserfs_ioctl,
|
.unlocked_ioctl = reiserfs_ioctl,
|
||||||
#ifdef CONFIG_COMPAT
|
#ifdef CONFIG_COMPAT
|
||||||
.compat_ioctl = reiserfs_compat_ioctl,
|
.compat_ioctl = reiserfs_compat_ioctl,
|
||||||
#endif
|
#endif
|
||||||
|
@@ -284,7 +284,7 @@ static ssize_t reiserfs_file_write(struct file *file, /* the file we are going t
|
|||||||
const struct file_operations reiserfs_file_operations = {
|
const struct file_operations reiserfs_file_operations = {
|
||||||
.read = do_sync_read,
|
.read = do_sync_read,
|
||||||
.write = reiserfs_file_write,
|
.write = reiserfs_file_write,
|
||||||
.ioctl = reiserfs_ioctl,
|
.unlocked_ioctl = reiserfs_ioctl,
|
||||||
#ifdef CONFIG_COMPAT
|
#ifdef CONFIG_COMPAT
|
||||||
.compat_ioctl = reiserfs_compat_ioctl,
|
.compat_ioctl = reiserfs_compat_ioctl,
|
||||||
#endif
|
#endif
|
||||||
|
@@ -20,9 +20,9 @@
|
|||||||
* 2) REISERFS_IOC_[GS]ETFLAGS, REISERFS_IOC_[GS]ETVERSION
|
* 2) REISERFS_IOC_[GS]ETFLAGS, REISERFS_IOC_[GS]ETVERSION
|
||||||
* 3) That's all for a while ...
|
* 3) That's all for a while ...
|
||||||
*/
|
*/
|
||||||
int reiserfs_ioctl(struct inode *inode, struct file *filp, unsigned int cmd,
|
long reiserfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
|
||||||
unsigned long arg)
|
|
||||||
{
|
{
|
||||||
|
struct inode *inode = filp->f_path.dentry->d_inode;
|
||||||
unsigned int flags;
|
unsigned int flags;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
@@ -132,9 +132,6 @@ setversion_out:
|
|||||||
long reiserfs_compat_ioctl(struct file *file, unsigned int cmd,
|
long reiserfs_compat_ioctl(struct file *file, unsigned int cmd,
|
||||||
unsigned long arg)
|
unsigned long arg)
|
||||||
{
|
{
|
||||||
struct inode *inode = file->f_path.dentry->d_inode;
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
/* These are just misnamed, they actually get/put from/to user an int */
|
/* These are just misnamed, they actually get/put from/to user an int */
|
||||||
switch (cmd) {
|
switch (cmd) {
|
||||||
case REISERFS_IOC32_UNPACK:
|
case REISERFS_IOC32_UNPACK:
|
||||||
@@ -156,9 +153,7 @@ long reiserfs_compat_ioctl(struct file *file, unsigned int cmd,
|
|||||||
return -ENOIOCTLCMD;
|
return -ENOIOCTLCMD;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = reiserfs_ioctl(inode, file, cmd, (unsigned long) compat_ptr(arg));
|
return reiserfs_ioctl(file, cmd, (unsigned long) compat_ptr(arg));
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -2314,8 +2314,7 @@ __u32 r5_hash(const signed char *msg, int len);
|
|||||||
#define SPARE_SPACE 500
|
#define SPARE_SPACE 500
|
||||||
|
|
||||||
/* prototypes from ioctl.c */
|
/* prototypes from ioctl.c */
|
||||||
int reiserfs_ioctl(struct inode *inode, struct file *filp,
|
long reiserfs_ioctl(struct file *filp, unsigned int cmd, unsigned long arg);
|
||||||
unsigned int cmd, unsigned long arg);
|
|
||||||
long reiserfs_compat_ioctl(struct file *filp,
|
long reiserfs_compat_ioctl(struct file *filp,
|
||||||
unsigned int cmd, unsigned long arg);
|
unsigned int cmd, unsigned long arg);
|
||||||
int reiserfs_unpack(struct inode *inode, struct file *filp);
|
int reiserfs_unpack(struct inode *inode, struct file *filp);
|
||||||
|
Reference in New Issue
Block a user