diff options
author | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2010-04-10 11:47:18 -0400 |
---|---|---|
committer | Stefan Richter <stefanr@s5r6.in-berlin.de> | 2010-04-10 10:51:15 -0400 |
commit | 7cfe21aae155c26193fde617dc61d37a79a63f86 (patch) | |
tree | 6600d3171afdfad430155f5e8a1f526367a6174d /drivers/ieee1394/video1394.c | |
parent | 3ac26b2ee30005930117fe6a180c139c5f300faf (diff) |
ieee1394: mark char device files as not seekable
The
- raw1394 (/dev/raw1394),
- video1394 (/dev/video1394/*),
- dv1394 (/dev/dv1394/*)
character device file ABIs do not make any use of lseek(), pread(), or
pwrite(). Therefore use nonseekable_open() and, redundantly, set
file_operations.llseek to no_llseek to remove any doubt whether the BKL-
grabbing default_llseek handler is used.
Although all this is legacy code which should be left in peace until it
is eventually removed (as it is superseded by firewire-core's
<linux/firewire-cdev.h> ABI), this change seems still worth doing to
further minimize the presence of BKL usage in the kernel.
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
Diffstat (limited to 'drivers/ieee1394/video1394.c')
-rw-r--r-- | drivers/ieee1394/video1394.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/ieee1394/video1394.c b/drivers/ieee1394/video1394.c index 949064a05675..a42bd6893bcf 100644 --- a/drivers/ieee1394/video1394.c +++ b/drivers/ieee1394/video1394.c | |||
@@ -1239,7 +1239,7 @@ static int video1394_open(struct inode *inode, struct file *file) | |||
1239 | ctx->current_ctx = NULL; | 1239 | ctx->current_ctx = NULL; |
1240 | file->private_data = ctx; | 1240 | file->private_data = ctx; |
1241 | 1241 | ||
1242 | return 0; | 1242 | return nonseekable_open(inode, file); |
1243 | } | 1243 | } |
1244 | 1244 | ||
1245 | static int video1394_release(struct inode *inode, struct file *file) | 1245 | static int video1394_release(struct inode *inode, struct file *file) |
@@ -1287,7 +1287,8 @@ static const struct file_operations video1394_fops= | |||
1287 | .poll = video1394_poll, | 1287 | .poll = video1394_poll, |
1288 | .mmap = video1394_mmap, | 1288 | .mmap = video1394_mmap, |
1289 | .open = video1394_open, | 1289 | .open = video1394_open, |
1290 | .release = video1394_release | 1290 | .release = video1394_release, |
1291 | .llseek = no_llseek, | ||
1291 | }; | 1292 | }; |
1292 | 1293 | ||
1293 | /*** HOTPLUG STUFF **********************************************************/ | 1294 | /*** HOTPLUG STUFF **********************************************************/ |