logfs: kill BKL
authorArnd Bergmann <arnd@arndb.de>
Tue, 27 Apr 2010 20:30:06 +0000 (22:30 +0200)
committerFrederic Weisbecker <fweisbec@gmail.com>
Fri, 13 Aug 2010 22:24:24 +0000 (00:24 +0200)
logfs does not need the BKL, so use ->unlocked_ioctl instead
of ->ioctl in file operations.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Joern Engel <joern@logfs.org>
[ fixed trivial conflict ]
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
fs/logfs/dir.c
fs/logfs/file.c
fs/logfs/logfs.h

index 675cc49197feb177bcb67e0f0aefa66deed9cabd..9777eb5b552248410bd3331f97fb89e853149866 100644 (file)
@@ -824,7 +824,7 @@ const struct inode_operations logfs_dir_iops = {
 };
 const struct file_operations logfs_dir_fops = {
        .fsync          = logfs_fsync,
-       .ioctl          = logfs_ioctl,
+       .unlocked_ioctl = logfs_ioctl,
        .readdir        = logfs_readdir,
        .read           = generic_read_dir,
 };
index 4dd0f7c06e394e1a43b323f95f29784718a0ab9c..e86376b87af11d26034188df8d3c2da2bc469587 100644 (file)
@@ -181,9 +181,9 @@ static int logfs_releasepage(struct page *page, gfp_t only_xfs_uses_this)
 }
 
 
-int logfs_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
-               unsigned long arg)
+long logfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 {
+       struct inode *inode = file->f_path.dentry->d_inode;
        struct logfs_inode *li = logfs_inode(inode);
        unsigned int oldflags, flags;
        int err;
@@ -255,7 +255,7 @@ const struct file_operations logfs_reg_fops = {
        .aio_read       = generic_file_aio_read,
        .aio_write      = generic_file_aio_write,
        .fsync          = logfs_fsync,
-       .ioctl          = logfs_ioctl,
+       .unlocked_ioctl = logfs_ioctl,
        .llseek         = generic_file_llseek,
        .mmap           = generic_file_readonly_mmap,
        .open           = generic_file_open,
index 5e3b720779516d8ec6d8c74794c57c861a5436d5..b8786264d243fcd49d31f9d3fe670657264e46d4 100644 (file)
@@ -504,8 +504,7 @@ extern const struct inode_operations logfs_reg_iops;
 extern const struct file_operations logfs_reg_fops;
 extern const struct address_space_operations logfs_reg_aops;
 int logfs_readpage(struct file *file, struct page *page);
-int logfs_ioctl(struct inode *inode, struct file *file, unsigned int cmd,
-               unsigned long arg);
+long logfs_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
 int logfs_fsync(struct file *file, int datasync);
 
 /* gc.c */