Skip to content

Commit

Permalink
dm ioctl: use nonseekable_open
Browse files Browse the repository at this point in the history
The dm control device does not implement read/write, so it has no use for
seeking.  Using no_llseek prevents falling back to default_llseek, which
requires the BKL.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
  • Loading branch information
Arnd Bergmann authored and Alasdair G Kergon committed Aug 12, 2010
1 parent 3f77316 commit 402ab35
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/md/dm-ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1602,6 +1602,7 @@ static long dm_compat_ctl_ioctl(struct file *file, uint command, ulong u)
#endif

static const struct file_operations _ctl_fops = {
.open = nonseekable_open,
.unlocked_ioctl = dm_ctl_ioctl,
.compat_ioctl = dm_compat_ctl_ioctl,
.owner = THIS_MODULE,
Expand Down

0 comments on commit 402ab35

Please sign in to comment.