Skip to content

Commit

Permalink
logfs: kill BKL
Browse files Browse the repository at this point in the history
logfs does not need the BKL, so use ->unlocked_ioctl instead
of ->ioctl in file operations.

Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Joern Engel <[email protected]>
[ fixed trivial conflict ]
Signed-off-by: Frederic Weisbecker <[email protected]>
  • Loading branch information
arndb authored and fweisbec committed Aug 13, 2010
1 parent 2be1f3a commit 02d6d68
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion fs/logfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
6 changes: 3 additions & 3 deletions fs/logfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions fs/logfs/logfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 02d6d68

Please sign in to comment.