diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 13:52:56 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-22 13:52:56 -0400 |
commit | 092e0e7e520a1fca03e13c9f2d157432a8657ff2 (patch) | |
tree | 451897252c4c08c4b5a8ef535da156f1e817e80b /fs | |
parent | 79f14b7c56d3b3ba58f8b43d1f70b9b71477a800 (diff) | |
parent | 776c163b1b93c8dfa5edba885bc2bfbc2d228a5f (diff) |
Merge branch 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl
* 'llseek' of git://git.kernel.org/pub/scm/linux/kernel/git/arnd/bkl:
vfs: make no_llseek the default
vfs: don't use BKL in default_llseek
llseek: automatically add .llseek fop
libfs: use generic_file_llseek for simple_attr
mac80211: disallow seeks in minstrel debug code
lirc: make chardev nonseekable
viotape: use noop_llseek
raw: use explicit llseek file operations
ibmasmfs: use generic_file_llseek
spufs: use llseek in all file operations
arm/omap: use generic_file_llseek in iommu_debug
lkdtm: use generic_file_llseek in debugfs
net/wireless: use generic_file_llseek in debugfs
drm: use noop_llseek
Diffstat (limited to 'fs')
39 files changed, 61 insertions, 7 deletions
diff --git a/fs/afs/mntpt.c b/fs/afs/mntpt.c index 6d552686c498..6153417caf57 100644 --- a/fs/afs/mntpt.c +++ b/fs/afs/mntpt.c | |||
@@ -29,6 +29,7 @@ static void afs_mntpt_expiry_timed_out(struct work_struct *work); | |||
29 | 29 | ||
30 | const struct file_operations afs_mntpt_file_operations = { | 30 | const struct file_operations afs_mntpt_file_operations = { |
31 | .open = afs_mntpt_open, | 31 | .open = afs_mntpt_open, |
32 | .llseek = noop_llseek, | ||
32 | }; | 33 | }; |
33 | 34 | ||
34 | const struct inode_operations afs_mntpt_inode_operations = { | 35 | const struct inode_operations afs_mntpt_inode_operations = { |
diff --git a/fs/autofs4/dev-ioctl.c b/fs/autofs4/dev-ioctl.c index ba4a38b9c22f..eff9a419469a 100644 --- a/fs/autofs4/dev-ioctl.c +++ b/fs/autofs4/dev-ioctl.c | |||
@@ -724,6 +724,7 @@ static const struct file_operations _dev_ioctl_fops = { | |||
724 | .unlocked_ioctl = autofs_dev_ioctl, | 724 | .unlocked_ioctl = autofs_dev_ioctl, |
725 | .compat_ioctl = autofs_dev_ioctl_compat, | 725 | .compat_ioctl = autofs_dev_ioctl_compat, |
726 | .owner = THIS_MODULE, | 726 | .owner = THIS_MODULE, |
727 | .llseek = noop_llseek, | ||
727 | }; | 728 | }; |
728 | 729 | ||
729 | static struct miscdevice _autofs_dev_ioctl_misc = { | 730 | static struct miscdevice _autofs_dev_ioctl_misc = { |
diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index fd0cc0bf9a40..139fc8083f53 100644 --- a/fs/binfmt_misc.c +++ b/fs/binfmt_misc.c | |||
@@ -576,6 +576,7 @@ static ssize_t bm_entry_write(struct file *file, const char __user *buffer, | |||
576 | static const struct file_operations bm_entry_operations = { | 576 | static const struct file_operations bm_entry_operations = { |
577 | .read = bm_entry_read, | 577 | .read = bm_entry_read, |
578 | .write = bm_entry_write, | 578 | .write = bm_entry_write, |
579 | .llseek = default_llseek, | ||
579 | }; | 580 | }; |
580 | 581 | ||
581 | /* /register */ | 582 | /* /register */ |
@@ -643,6 +644,7 @@ out: | |||
643 | 644 | ||
644 | static const struct file_operations bm_register_operations = { | 645 | static const struct file_operations bm_register_operations = { |
645 | .write = bm_register_write, | 646 | .write = bm_register_write, |
647 | .llseek = noop_llseek, | ||
646 | }; | 648 | }; |
647 | 649 | ||
648 | /* /status */ | 650 | /* /status */ |
@@ -680,6 +682,7 @@ static ssize_t bm_status_write(struct file * file, const char __user * buffer, | |||
680 | static const struct file_operations bm_status_operations = { | 682 | static const struct file_operations bm_status_operations = { |
681 | .read = bm_status_read, | 683 | .read = bm_status_read, |
682 | .write = bm_status_write, | 684 | .write = bm_status_write, |
685 | .llseek = default_llseek, | ||
683 | }; | 686 | }; |
684 | 687 | ||
685 | /* Superblock handling */ | 688 | /* Superblock handling */ |
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c index 1776dbd8dc98..144f8a5730f5 100644 --- a/fs/btrfs/super.c +++ b/fs/btrfs/super.c | |||
@@ -815,6 +815,7 @@ static const struct file_operations btrfs_ctl_fops = { | |||
815 | .unlocked_ioctl = btrfs_control_ioctl, | 815 | .unlocked_ioctl = btrfs_control_ioctl, |
816 | .compat_ioctl = btrfs_control_ioctl, | 816 | .compat_ioctl = btrfs_control_ioctl, |
817 | .owner = THIS_MODULE, | 817 | .owner = THIS_MODULE, |
818 | .llseek = noop_llseek, | ||
818 | }; | 819 | }; |
819 | 820 | ||
820 | static struct miscdevice btrfs_misc = { | 821 | static struct miscdevice btrfs_misc = { |
diff --git a/fs/cachefiles/daemon.c b/fs/cachefiles/daemon.c index 727caedcdd92..0a1467b15516 100644 --- a/fs/cachefiles/daemon.c +++ b/fs/cachefiles/daemon.c | |||
@@ -55,6 +55,7 @@ const struct file_operations cachefiles_daemon_fops = { | |||
55 | .read = cachefiles_daemon_read, | 55 | .read = cachefiles_daemon_read, |
56 | .write = cachefiles_daemon_write, | 56 | .write = cachefiles_daemon_write, |
57 | .poll = cachefiles_daemon_poll, | 57 | .poll = cachefiles_daemon_poll, |
58 | .llseek = noop_llseek, | ||
58 | }; | 59 | }; |
59 | 60 | ||
60 | struct cachefiles_daemon_cmd { | 61 | struct cachefiles_daemon_cmd { |
diff --git a/fs/char_dev.c b/fs/char_dev.c index 143d393881cb..e5b9df993b93 100644 --- a/fs/char_dev.c +++ b/fs/char_dev.c | |||
@@ -456,6 +456,7 @@ static void cdev_purge(struct cdev *cdev) | |||
456 | */ | 456 | */ |
457 | const struct file_operations def_chr_fops = { | 457 | const struct file_operations def_chr_fops = { |
458 | .open = chrdev_open, | 458 | .open = chrdev_open, |
459 | .llseek = noop_llseek, | ||
459 | }; | 460 | }; |
460 | 461 | ||
461 | static struct kobject *exact_match(dev_t dev, int *part, void *data) | 462 | static struct kobject *exact_match(dev_t dev, int *part, void *data) |
diff --git a/fs/coda/pioctl.c b/fs/coda/pioctl.c index ca25d96d45c9..028a9a0f588b 100644 --- a/fs/coda/pioctl.c +++ b/fs/coda/pioctl.c | |||
@@ -39,6 +39,7 @@ const struct inode_operations coda_ioctl_inode_operations = { | |||
39 | const struct file_operations coda_ioctl_operations = { | 39 | const struct file_operations coda_ioctl_operations = { |
40 | .owner = THIS_MODULE, | 40 | .owner = THIS_MODULE, |
41 | .unlocked_ioctl = coda_pioctl, | 41 | .unlocked_ioctl = coda_pioctl, |
42 | .llseek = noop_llseek, | ||
42 | }; | 43 | }; |
43 | 44 | ||
44 | /* the coda pioctl inode ops */ | 45 | /* the coda pioctl inode ops */ |
diff --git a/fs/coda/psdev.c b/fs/coda/psdev.c index 116af7546cf0..fdc2f3ef7ecd 100644 --- a/fs/coda/psdev.c +++ b/fs/coda/psdev.c | |||
@@ -346,6 +346,7 @@ static const struct file_operations coda_psdev_fops = { | |||
346 | .unlocked_ioctl = coda_psdev_ioctl, | 346 | .unlocked_ioctl = coda_psdev_ioctl, |
347 | .open = coda_psdev_open, | 347 | .open = coda_psdev_open, |
348 | .release = coda_psdev_release, | 348 | .release = coda_psdev_release, |
349 | .llseek = noop_llseek, | ||
349 | }; | 350 | }; |
350 | 351 | ||
351 | static int init_coda_psdev(void) | 352 | static int init_coda_psdev(void) |
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c index 0210898458b2..89d394d8fe24 100644 --- a/fs/debugfs/file.c +++ b/fs/debugfs/file.c | |||
@@ -43,6 +43,7 @@ const struct file_operations debugfs_file_operations = { | |||
43 | .read = default_read_file, | 43 | .read = default_read_file, |
44 | .write = default_write_file, | 44 | .write = default_write_file, |
45 | .open = default_open, | 45 | .open = default_open, |
46 | .llseek = noop_llseek, | ||
46 | }; | 47 | }; |
47 | 48 | ||
48 | static void *debugfs_follow_link(struct dentry *dentry, struct nameidata *nd) | 49 | static void *debugfs_follow_link(struct dentry *dentry, struct nameidata *nd) |
@@ -454,6 +455,7 @@ static const struct file_operations fops_bool = { | |||
454 | .read = read_file_bool, | 455 | .read = read_file_bool, |
455 | .write = write_file_bool, | 456 | .write = write_file_bool, |
456 | .open = default_open, | 457 | .open = default_open, |
458 | .llseek = default_llseek, | ||
457 | }; | 459 | }; |
458 | 460 | ||
459 | /** | 461 | /** |
@@ -498,6 +500,7 @@ static ssize_t read_file_blob(struct file *file, char __user *user_buf, | |||
498 | static const struct file_operations fops_blob = { | 500 | static const struct file_operations fops_blob = { |
499 | .read = read_file_blob, | 501 | .read = read_file_blob, |
500 | .open = default_open, | 502 | .open = default_open, |
503 | .llseek = default_llseek, | ||
501 | }; | 504 | }; |
502 | 505 | ||
503 | /** | 506 | /** |
diff --git a/fs/dlm/debug_fs.c b/fs/dlm/debug_fs.c index c6cf25158746..6b42ba807dfd 100644 --- a/fs/dlm/debug_fs.c +++ b/fs/dlm/debug_fs.c | |||
@@ -643,7 +643,8 @@ static ssize_t waiters_read(struct file *file, char __user *userbuf, | |||
643 | static const struct file_operations waiters_fops = { | 643 | static const struct file_operations waiters_fops = { |
644 | .owner = THIS_MODULE, | 644 | .owner = THIS_MODULE, |
645 | .open = waiters_open, | 645 | .open = waiters_open, |
646 | .read = waiters_read | 646 | .read = waiters_read, |
647 | .llseek = default_llseek, | ||
647 | }; | 648 | }; |
648 | 649 | ||
649 | void dlm_delete_debug_file(struct dlm_ls *ls) | 650 | void dlm_delete_debug_file(struct dlm_ls *ls) |
diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c index d45c02db6943..30d8b85febbf 100644 --- a/fs/dlm/plock.c +++ b/fs/dlm/plock.c | |||
@@ -412,7 +412,8 @@ static const struct file_operations dev_fops = { | |||
412 | .read = dev_read, | 412 | .read = dev_read, |
413 | .write = dev_write, | 413 | .write = dev_write, |
414 | .poll = dev_poll, | 414 | .poll = dev_poll, |
415 | .owner = THIS_MODULE | 415 | .owner = THIS_MODULE, |
416 | .llseek = noop_llseek, | ||
416 | }; | 417 | }; |
417 | 418 | ||
418 | static struct miscdevice plock_dev_misc = { | 419 | static struct miscdevice plock_dev_misc = { |
diff --git a/fs/dlm/user.c b/fs/dlm/user.c index b6272853130c..66d6c16bf440 100644 --- a/fs/dlm/user.c +++ b/fs/dlm/user.c | |||
@@ -1009,6 +1009,7 @@ static const struct file_operations device_fops = { | |||
1009 | .write = device_write, | 1009 | .write = device_write, |
1010 | .poll = device_poll, | 1010 | .poll = device_poll, |
1011 | .owner = THIS_MODULE, | 1011 | .owner = THIS_MODULE, |
1012 | .llseek = noop_llseek, | ||
1012 | }; | 1013 | }; |
1013 | 1014 | ||
1014 | static const struct file_operations ctl_device_fops = { | 1015 | static const struct file_operations ctl_device_fops = { |
@@ -1017,6 +1018,7 @@ static const struct file_operations ctl_device_fops = { | |||
1017 | .read = device_read, | 1018 | .read = device_read, |
1018 | .write = device_write, | 1019 | .write = device_write, |
1019 | .owner = THIS_MODULE, | 1020 | .owner = THIS_MODULE, |
1021 | .llseek = noop_llseek, | ||
1020 | }; | 1022 | }; |
1021 | 1023 | ||
1022 | static struct miscdevice ctl_device = { | 1024 | static struct miscdevice ctl_device = { |
@@ -1029,6 +1031,7 @@ static const struct file_operations monitor_device_fops = { | |||
1029 | .open = monitor_device_open, | 1031 | .open = monitor_device_open, |
1030 | .release = monitor_device_close, | 1032 | .release = monitor_device_close, |
1031 | .owner = THIS_MODULE, | 1033 | .owner = THIS_MODULE, |
1034 | .llseek = noop_llseek, | ||
1032 | }; | 1035 | }; |
1033 | 1036 | ||
1034 | static struct miscdevice monitor_device = { | 1037 | static struct miscdevice monitor_device = { |
diff --git a/fs/ecryptfs/file.c b/fs/ecryptfs/file.c index 2b9a644b7583..91da02987bff 100644 --- a/fs/ecryptfs/file.c +++ b/fs/ecryptfs/file.c | |||
@@ -329,6 +329,7 @@ const struct file_operations ecryptfs_dir_fops = { | |||
329 | .fsync = ecryptfs_fsync, | 329 | .fsync = ecryptfs_fsync, |
330 | .fasync = ecryptfs_fasync, | 330 | .fasync = ecryptfs_fasync, |
331 | .splice_read = generic_file_splice_read, | 331 | .splice_read = generic_file_splice_read, |
332 | .llseek = default_llseek, | ||
332 | }; | 333 | }; |
333 | 334 | ||
334 | const struct file_operations ecryptfs_main_fops = { | 335 | const struct file_operations ecryptfs_main_fops = { |
diff --git a/fs/ecryptfs/miscdev.c b/fs/ecryptfs/miscdev.c index 00208c3d7e92..940a82e63dc3 100644 --- a/fs/ecryptfs/miscdev.c +++ b/fs/ecryptfs/miscdev.c | |||
@@ -482,6 +482,7 @@ static const struct file_operations ecryptfs_miscdev_fops = { | |||
482 | .read = ecryptfs_miscdev_read, | 482 | .read = ecryptfs_miscdev_read, |
483 | .write = ecryptfs_miscdev_write, | 483 | .write = ecryptfs_miscdev_write, |
484 | .release = ecryptfs_miscdev_release, | 484 | .release = ecryptfs_miscdev_release, |
485 | .llseek = noop_llseek, | ||
485 | }; | 486 | }; |
486 | 487 | ||
487 | static struct miscdevice ecryptfs_miscdev = { | 488 | static struct miscdevice ecryptfs_miscdev = { |
diff --git a/fs/eventfd.c b/fs/eventfd.c index 6bd3f76fdf88..e0194b3e14d6 100644 --- a/fs/eventfd.c +++ b/fs/eventfd.c | |||
@@ -293,6 +293,7 @@ static const struct file_operations eventfd_fops = { | |||
293 | .poll = eventfd_poll, | 293 | .poll = eventfd_poll, |
294 | .read = eventfd_read, | 294 | .read = eventfd_read, |
295 | .write = eventfd_write, | 295 | .write = eventfd_write, |
296 | .llseek = noop_llseek, | ||
296 | }; | 297 | }; |
297 | 298 | ||
298 | /** | 299 | /** |
diff --git a/fs/eventpoll.c b/fs/eventpoll.c index 3817149919cb..256bb7bb102a 100644 --- a/fs/eventpoll.c +++ b/fs/eventpoll.c | |||
@@ -674,7 +674,8 @@ static unsigned int ep_eventpoll_poll(struct file *file, poll_table *wait) | |||
674 | /* File callbacks that implement the eventpoll file behaviour */ | 674 | /* File callbacks that implement the eventpoll file behaviour */ |
675 | static const struct file_operations eventpoll_fops = { | 675 | static const struct file_operations eventpoll_fops = { |
676 | .release = ep_eventpoll_release, | 676 | .release = ep_eventpoll_release, |
677 | .poll = ep_eventpoll_poll | 677 | .poll = ep_eventpoll_poll, |
678 | .llseek = noop_llseek, | ||
678 | }; | 679 | }; |
679 | 680 | ||
680 | /* Fast test to see if the file is an evenpoll file */ | 681 | /* Fast test to see if the file is an evenpoll file */ |
@@ -151,4 +151,5 @@ err_nocleanup: | |||
151 | */ | 151 | */ |
152 | const struct file_operations def_fifo_fops = { | 152 | const struct file_operations def_fifo_fops = { |
153 | .open = fifo_open, /* will set read_ or write_pipefifo_fops */ | 153 | .open = fifo_open, /* will set read_ or write_pipefifo_fops */ |
154 | .llseek = noop_llseek, | ||
154 | }; | 155 | }; |
diff --git a/fs/fuse/control.c b/fs/fuse/control.c index 3773fd63d2f9..7367e177186f 100644 --- a/fs/fuse/control.c +++ b/fs/fuse/control.c | |||
@@ -179,23 +179,27 @@ static ssize_t fuse_conn_congestion_threshold_write(struct file *file, | |||
179 | static const struct file_operations fuse_ctl_abort_ops = { | 179 | static const struct file_operations fuse_ctl_abort_ops = { |
180 | .open = nonseekable_open, | 180 | .open = nonseekable_open, |
181 | .write = fuse_conn_abort_write, | 181 | .write = fuse_conn_abort_write, |
182 | .llseek = no_llseek, | ||
182 | }; | 183 | }; |
183 | 184 | ||
184 | static const struct file_operations fuse_ctl_waiting_ops = { | 185 | static const struct file_operations fuse_ctl_waiting_ops = { |
185 | .open = nonseekable_open, | 186 | .open = nonseekable_open, |
186 | .read = fuse_conn_waiting_read, | 187 | .read = fuse_conn_waiting_read, |
188 | .llseek = no_llseek, | ||
187 | }; | 189 | }; |
188 | 190 | ||
189 | static const struct file_operations fuse_conn_max_background_ops = { | 191 | static const struct file_operations fuse_conn_max_background_ops = { |
190 | .open = nonseekable_open, | 192 | .open = nonseekable_open, |
191 | .read = fuse_conn_max_background_read, | 193 | .read = fuse_conn_max_background_read, |
192 | .write = fuse_conn_max_background_write, | 194 | .write = fuse_conn_max_background_write, |
195 | .llseek = no_llseek, | ||
193 | }; | 196 | }; |
194 | 197 | ||
195 | static const struct file_operations fuse_conn_congestion_threshold_ops = { | 198 | static const struct file_operations fuse_conn_congestion_threshold_ops = { |
196 | .open = nonseekable_open, | 199 | .open = nonseekable_open, |
197 | .read = fuse_conn_congestion_threshold_read, | 200 | .read = fuse_conn_congestion_threshold_read, |
198 | .write = fuse_conn_congestion_threshold_write, | 201 | .write = fuse_conn_congestion_threshold_write, |
202 | .llseek = no_llseek, | ||
199 | }; | 203 | }; |
200 | 204 | ||
201 | static struct dentry *fuse_ctl_add_dentry(struct dentry *parent, | 205 | static struct dentry *fuse_ctl_add_dentry(struct dentry *parent, |
diff --git a/fs/fuse/cuse.c b/fs/fuse/cuse.c index e1f8171278bd..3e87cce5837d 100644 --- a/fs/fuse/cuse.c +++ b/fs/fuse/cuse.c | |||
@@ -182,6 +182,7 @@ static const struct file_operations cuse_frontend_fops = { | |||
182 | .unlocked_ioctl = cuse_file_ioctl, | 182 | .unlocked_ioctl = cuse_file_ioctl, |
183 | .compat_ioctl = cuse_file_compat_ioctl, | 183 | .compat_ioctl = cuse_file_compat_ioctl, |
184 | .poll = fuse_file_poll, | 184 | .poll = fuse_file_poll, |
185 | .llseek = noop_llseek, | ||
185 | }; | 186 | }; |
186 | 187 | ||
187 | 188 | ||
diff --git a/fs/gfs2/file.c b/fs/gfs2/file.c index a51079bd4af1..aa996471ec5c 100644 --- a/fs/gfs2/file.c +++ b/fs/gfs2/file.c | |||
@@ -775,6 +775,7 @@ const struct file_operations gfs2_dir_fops = { | |||
775 | .fsync = gfs2_fsync, | 775 | .fsync = gfs2_fsync, |
776 | .lock = gfs2_lock, | 776 | .lock = gfs2_lock, |
777 | .flock = gfs2_flock, | 777 | .flock = gfs2_flock, |
778 | .llseek = default_llseek, | ||
778 | }; | 779 | }; |
779 | 780 | ||
780 | #endif /* CONFIG_GFS2_FS_LOCKING_DLM */ | 781 | #endif /* CONFIG_GFS2_FS_LOCKING_DLM */ |
@@ -801,5 +802,6 @@ const struct file_operations gfs2_dir_fops_nolock = { | |||
801 | .open = gfs2_open, | 802 | .open = gfs2_open, |
802 | .release = gfs2_close, | 803 | .release = gfs2_close, |
803 | .fsync = gfs2_fsync, | 804 | .fsync = gfs2_fsync, |
805 | .llseek = default_llseek, | ||
804 | }; | 806 | }; |
805 | 807 | ||
diff --git a/fs/hppfs/hppfs.c b/fs/hppfs/hppfs.c index 7b027720d820..4e2a45ea6140 100644 --- a/fs/hppfs/hppfs.c +++ b/fs/hppfs/hppfs.c | |||
@@ -598,6 +598,7 @@ static const struct file_operations hppfs_dir_fops = { | |||
598 | .readdir = hppfs_readdir, | 598 | .readdir = hppfs_readdir, |
599 | .open = hppfs_dir_open, | 599 | .open = hppfs_dir_open, |
600 | .fsync = hppfs_fsync, | 600 | .fsync = hppfs_fsync, |
601 | .llseek = default_llseek, | ||
601 | }; | 602 | }; |
602 | 603 | ||
603 | static int hppfs_statfs(struct dentry *dentry, struct kstatfs *sf) | 604 | static int hppfs_statfs(struct dentry *dentry, struct kstatfs *sf) |
diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c index 6e5bd42f3860..113eba3d3c38 100644 --- a/fs/hugetlbfs/inode.c +++ b/fs/hugetlbfs/inode.c | |||
@@ -674,6 +674,7 @@ const struct file_operations hugetlbfs_file_operations = { | |||
674 | .mmap = hugetlbfs_file_mmap, | 674 | .mmap = hugetlbfs_file_mmap, |
675 | .fsync = noop_fsync, | 675 | .fsync = noop_fsync, |
676 | .get_unmapped_area = hugetlb_get_unmapped_area, | 676 | .get_unmapped_area = hugetlb_get_unmapped_area, |
677 | .llseek = default_llseek, | ||
677 | }; | 678 | }; |
678 | 679 | ||
679 | static const struct inode_operations hugetlbfs_dir_inode_operations = { | 680 | static const struct inode_operations hugetlbfs_dir_inode_operations = { |
diff --git a/fs/logfs/dir.c b/fs/logfs/dir.c index 9777eb5b5522..1eb4e89e045b 100644 --- a/fs/logfs/dir.c +++ b/fs/logfs/dir.c | |||
@@ -827,4 +827,5 @@ const struct file_operations logfs_dir_fops = { | |||
827 | .unlocked_ioctl = logfs_ioctl, | 827 | .unlocked_ioctl = logfs_ioctl, |
828 | .readdir = logfs_readdir, | 828 | .readdir = logfs_readdir, |
829 | .read = generic_read_dir, | 829 | .read = generic_read_dir, |
830 | .llseek = default_llseek, | ||
830 | }; | 831 | }; |
diff --git a/fs/nfsd/nfsctl.c b/fs/nfsd/nfsctl.c index b53b1d042f1f..06fa87e52e82 100644 --- a/fs/nfsd/nfsctl.c +++ b/fs/nfsd/nfsctl.c | |||
@@ -137,6 +137,7 @@ static const struct file_operations transaction_ops = { | |||
137 | .write = nfsctl_transaction_write, | 137 | .write = nfsctl_transaction_write, |
138 | .read = nfsctl_transaction_read, | 138 | .read = nfsctl_transaction_read, |
139 | .release = simple_transaction_release, | 139 | .release = simple_transaction_release, |
140 | .llseek = default_llseek, | ||
140 | }; | 141 | }; |
141 | 142 | ||
142 | static int exports_open(struct inode *inode, struct file *file) | 143 | static int exports_open(struct inode *inode, struct file *file) |
diff --git a/fs/no-block.c b/fs/no-block.c index d269a93d3467..6e40e42a43de 100644 --- a/fs/no-block.c +++ b/fs/no-block.c | |||
@@ -19,4 +19,5 @@ static int no_blkdev_open(struct inode * inode, struct file * filp) | |||
19 | 19 | ||
20 | const struct file_operations def_blk_fops = { | 20 | const struct file_operations def_blk_fops = { |
21 | .open = no_blkdev_open, | 21 | .open = no_blkdev_open, |
22 | .llseek = noop_llseek, | ||
22 | }; | 23 | }; |
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c index 5ed8e58d7bfc..bbcb98e7fcc6 100644 --- a/fs/notify/fanotify/fanotify_user.c +++ b/fs/notify/fanotify/fanotify_user.c | |||
@@ -433,6 +433,7 @@ static const struct file_operations fanotify_fops = { | |||
433 | .release = fanotify_release, | 433 | .release = fanotify_release, |
434 | .unlocked_ioctl = fanotify_ioctl, | 434 | .unlocked_ioctl = fanotify_ioctl, |
435 | .compat_ioctl = fanotify_ioctl, | 435 | .compat_ioctl = fanotify_ioctl, |
436 | .llseek = noop_llseek, | ||
436 | }; | 437 | }; |
437 | 438 | ||
438 | static void fanotify_free_mark(struct fsnotify_mark *fsn_mark) | 439 | static void fanotify_free_mark(struct fsnotify_mark *fsn_mark) |
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index bf7f6d776c31..24edc1185d53 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c | |||
@@ -344,6 +344,7 @@ static const struct file_operations inotify_fops = { | |||
344 | .release = inotify_release, | 344 | .release = inotify_release, |
345 | .unlocked_ioctl = inotify_ioctl, | 345 | .unlocked_ioctl = inotify_ioctl, |
346 | .compat_ioctl = inotify_ioctl, | 346 | .compat_ioctl = inotify_ioctl, |
347 | .llseek = noop_llseek, | ||
347 | }; | 348 | }; |
348 | 349 | ||
349 | 350 | ||
diff --git a/fs/ocfs2/dlmfs/dlmfs.c b/fs/ocfs2/dlmfs/dlmfs.c index c2903b84bb7a..a7ebd9d42dc8 100644 --- a/fs/ocfs2/dlmfs/dlmfs.c +++ b/fs/ocfs2/dlmfs/dlmfs.c | |||
@@ -612,6 +612,7 @@ static const struct file_operations dlmfs_file_operations = { | |||
612 | .poll = dlmfs_file_poll, | 612 | .poll = dlmfs_file_poll, |
613 | .read = dlmfs_file_read, | 613 | .read = dlmfs_file_read, |
614 | .write = dlmfs_file_write, | 614 | .write = dlmfs_file_write, |
615 | .llseek = default_llseek, | ||
615 | }; | 616 | }; |
616 | 617 | ||
617 | static const struct inode_operations dlmfs_dir_inode_operations = { | 618 | static const struct inode_operations dlmfs_dir_inode_operations = { |
diff --git a/fs/ocfs2/stack_user.c b/fs/ocfs2/stack_user.c index 0e68f542ef2e..252e7c82f929 100644 --- a/fs/ocfs2/stack_user.c +++ b/fs/ocfs2/stack_user.c | |||
@@ -625,6 +625,7 @@ static const struct file_operations ocfs2_control_fops = { | |||
625 | .read = ocfs2_control_read, | 625 | .read = ocfs2_control_read, |
626 | .write = ocfs2_control_write, | 626 | .write = ocfs2_control_write, |
627 | .owner = THIS_MODULE, | 627 | .owner = THIS_MODULE, |
628 | .llseek = default_llseek, | ||
628 | }; | 629 | }; |
629 | 630 | ||
630 | static struct miscdevice ocfs2_control_device = { | 631 | static struct miscdevice ocfs2_control_device = { |
diff --git a/fs/proc/base.c b/fs/proc/base.c index 8e4addaa5424..dc5d5f51f3fe 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
@@ -1151,6 +1151,7 @@ static ssize_t oom_score_adj_write(struct file *file, const char __user *buf, | |||
1151 | static const struct file_operations proc_oom_score_adj_operations = { | 1151 | static const struct file_operations proc_oom_score_adj_operations = { |
1152 | .read = oom_score_adj_read, | 1152 | .read = oom_score_adj_read, |
1153 | .write = oom_score_adj_write, | 1153 | .write = oom_score_adj_write, |
1154 | .llseek = default_llseek, | ||
1154 | }; | 1155 | }; |
1155 | 1156 | ||
1156 | #ifdef CONFIG_AUDITSYSCALL | 1157 | #ifdef CONFIG_AUDITSYSCALL |
@@ -2039,11 +2040,13 @@ static ssize_t proc_fdinfo_read(struct file *file, char __user *buf, | |||
2039 | static const struct file_operations proc_fdinfo_file_operations = { | 2040 | static const struct file_operations proc_fdinfo_file_operations = { |
2040 | .open = nonseekable_open, | 2041 | .open = nonseekable_open, |
2041 | .read = proc_fdinfo_read, | 2042 | .read = proc_fdinfo_read, |
2043 | .llseek = no_llseek, | ||
2042 | }; | 2044 | }; |
2043 | 2045 | ||
2044 | static const struct file_operations proc_fd_operations = { | 2046 | static const struct file_operations proc_fd_operations = { |
2045 | .read = generic_read_dir, | 2047 | .read = generic_read_dir, |
2046 | .readdir = proc_readfd, | 2048 | .readdir = proc_readfd, |
2049 | .llseek = default_llseek, | ||
2047 | }; | 2050 | }; |
2048 | 2051 | ||
2049 | /* | 2052 | /* |
@@ -2112,6 +2115,7 @@ static int proc_readfdinfo(struct file *filp, void *dirent, filldir_t filldir) | |||
2112 | static const struct file_operations proc_fdinfo_operations = { | 2115 | static const struct file_operations proc_fdinfo_operations = { |
2113 | .read = generic_read_dir, | 2116 | .read = generic_read_dir, |
2114 | .readdir = proc_readfdinfo, | 2117 | .readdir = proc_readfdinfo, |
2118 | .llseek = default_llseek, | ||
2115 | }; | 2119 | }; |
2116 | 2120 | ||
2117 | /* | 2121 | /* |
@@ -2343,6 +2347,7 @@ static int proc_attr_dir_readdir(struct file * filp, | |||
2343 | static const struct file_operations proc_attr_dir_operations = { | 2347 | static const struct file_operations proc_attr_dir_operations = { |
2344 | .read = generic_read_dir, | 2348 | .read = generic_read_dir, |
2345 | .readdir = proc_attr_dir_readdir, | 2349 | .readdir = proc_attr_dir_readdir, |
2350 | .llseek = default_llseek, | ||
2346 | }; | 2351 | }; |
2347 | 2352 | ||
2348 | static struct dentry *proc_attr_dir_lookup(struct inode *dir, | 2353 | static struct dentry *proc_attr_dir_lookup(struct inode *dir, |
@@ -2751,6 +2756,7 @@ static int proc_tgid_base_readdir(struct file * filp, | |||
2751 | static const struct file_operations proc_tgid_base_operations = { | 2756 | static const struct file_operations proc_tgid_base_operations = { |
2752 | .read = generic_read_dir, | 2757 | .read = generic_read_dir, |
2753 | .readdir = proc_tgid_base_readdir, | 2758 | .readdir = proc_tgid_base_readdir, |
2759 | .llseek = default_llseek, | ||
2754 | }; | 2760 | }; |
2755 | 2761 | ||
2756 | static struct dentry *proc_tgid_base_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd){ | 2762 | static struct dentry *proc_tgid_base_lookup(struct inode *dir, struct dentry *dentry, struct nameidata *nd){ |
@@ -3088,6 +3094,7 @@ static struct dentry *proc_tid_base_lookup(struct inode *dir, struct dentry *den | |||
3088 | static const struct file_operations proc_tid_base_operations = { | 3094 | static const struct file_operations proc_tid_base_operations = { |
3089 | .read = generic_read_dir, | 3095 | .read = generic_read_dir, |
3090 | .readdir = proc_tid_base_readdir, | 3096 | .readdir = proc_tid_base_readdir, |
3097 | .llseek = default_llseek, | ||
3091 | }; | 3098 | }; |
3092 | 3099 | ||
3093 | static const struct inode_operations proc_tid_base_inode_operations = { | 3100 | static const struct inode_operations proc_tid_base_inode_operations = { |
@@ -3324,4 +3331,5 @@ static const struct inode_operations proc_task_inode_operations = { | |||
3324 | static const struct file_operations proc_task_operations = { | 3331 | static const struct file_operations proc_task_operations = { |
3325 | .read = generic_read_dir, | 3332 | .read = generic_read_dir, |
3326 | .readdir = proc_task_readdir, | 3333 | .readdir = proc_task_readdir, |
3334 | .llseek = default_llseek, | ||
3327 | }; | 3335 | }; |
diff --git a/fs/proc/proc_sysctl.c b/fs/proc/proc_sysctl.c index 5be436ea088e..2fc52552271d 100644 --- a/fs/proc/proc_sysctl.c +++ b/fs/proc/proc_sysctl.c | |||
@@ -364,6 +364,7 @@ static int proc_sys_getattr(struct vfsmount *mnt, struct dentry *dentry, struct | |||
364 | static const struct file_operations proc_sys_file_operations = { | 364 | static const struct file_operations proc_sys_file_operations = { |
365 | .read = proc_sys_read, | 365 | .read = proc_sys_read, |
366 | .write = proc_sys_write, | 366 | .write = proc_sys_write, |
367 | .llseek = default_llseek, | ||
367 | }; | 368 | }; |
368 | 369 | ||
369 | static const struct file_operations proc_sys_dir_file_operations = { | 370 | static const struct file_operations proc_sys_dir_file_operations = { |
diff --git a/fs/proc/root.c b/fs/proc/root.c index 4258384ed22d..93d99b316325 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c | |||
@@ -179,6 +179,7 @@ static int proc_root_readdir(struct file * filp, | |||
179 | static const struct file_operations proc_root_operations = { | 179 | static const struct file_operations proc_root_operations = { |
180 | .read = generic_read_dir, | 180 | .read = generic_read_dir, |
181 | .readdir = proc_root_readdir, | 181 | .readdir = proc_root_readdir, |
182 | .llseek = default_llseek, | ||
182 | }; | 183 | }; |
183 | 184 | ||
184 | /* | 185 | /* |
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c index 1dbca4e8cc16..871e25ed0069 100644 --- a/fs/proc/task_mmu.c +++ b/fs/proc/task_mmu.c | |||
@@ -539,6 +539,7 @@ static ssize_t clear_refs_write(struct file *file, const char __user *buf, | |||
539 | 539 | ||
540 | const struct file_operations proc_clear_refs_operations = { | 540 | const struct file_operations proc_clear_refs_operations = { |
541 | .write = clear_refs_write, | 541 | .write = clear_refs_write, |
542 | .llseek = noop_llseek, | ||
542 | }; | 543 | }; |
543 | 544 | ||
544 | struct pagemapread { | 545 | struct pagemapread { |
diff --git a/fs/read_write.c b/fs/read_write.c index 74e36586e4d3..e757ef26e4ce 100644 --- a/fs/read_write.c +++ b/fs/read_write.c | |||
@@ -124,7 +124,7 @@ loff_t default_llseek(struct file *file, loff_t offset, int origin) | |||
124 | { | 124 | { |
125 | loff_t retval; | 125 | loff_t retval; |
126 | 126 | ||
127 | lock_kernel(); | 127 | mutex_lock(&file->f_dentry->d_inode->i_mutex); |
128 | switch (origin) { | 128 | switch (origin) { |
129 | case SEEK_END: | 129 | case SEEK_END: |
130 | offset += i_size_read(file->f_path.dentry->d_inode); | 130 | offset += i_size_read(file->f_path.dentry->d_inode); |
@@ -145,7 +145,7 @@ loff_t default_llseek(struct file *file, loff_t offset, int origin) | |||
145 | retval = offset; | 145 | retval = offset; |
146 | } | 146 | } |
147 | out: | 147 | out: |
148 | unlock_kernel(); | 148 | mutex_unlock(&file->f_dentry->d_inode->i_mutex); |
149 | return retval; | 149 | return retval; |
150 | } | 150 | } |
151 | EXPORT_SYMBOL(default_llseek); | 151 | EXPORT_SYMBOL(default_llseek); |
@@ -156,7 +156,6 @@ loff_t vfs_llseek(struct file *file, loff_t offset, int origin) | |||
156 | 156 | ||
157 | fn = no_llseek; | 157 | fn = no_llseek; |
158 | if (file->f_mode & FMODE_LSEEK) { | 158 | if (file->f_mode & FMODE_LSEEK) { |
159 | fn = default_llseek; | ||
160 | if (file->f_op && file->f_op->llseek) | 159 | if (file->f_op && file->f_op->llseek) |
161 | fn = file->f_op->llseek; | 160 | fn = file->f_op->llseek; |
162 | } | 161 | } |
diff --git a/fs/romfs/super.c b/fs/romfs/super.c index 42d213546894..268580535c92 100644 --- a/fs/romfs/super.c +++ b/fs/romfs/super.c | |||
@@ -282,6 +282,7 @@ error: | |||
282 | static const struct file_operations romfs_dir_operations = { | 282 | static const struct file_operations romfs_dir_operations = { |
283 | .read = generic_read_dir, | 283 | .read = generic_read_dir, |
284 | .readdir = romfs_readdir, | 284 | .readdir = romfs_readdir, |
285 | .llseek = default_llseek, | ||
285 | }; | 286 | }; |
286 | 287 | ||
287 | static const struct inode_operations romfs_dir_inode_operations = { | 288 | static const struct inode_operations romfs_dir_inode_operations = { |
diff --git a/fs/signalfd.c b/fs/signalfd.c index 1c5a6add779d..74047304b01a 100644 --- a/fs/signalfd.c +++ b/fs/signalfd.c | |||
@@ -206,6 +206,7 @@ static const struct file_operations signalfd_fops = { | |||
206 | .release = signalfd_release, | 206 | .release = signalfd_release, |
207 | .poll = signalfd_poll, | 207 | .poll = signalfd_poll, |
208 | .read = signalfd_read, | 208 | .read = signalfd_read, |
209 | .llseek = noop_llseek, | ||
209 | }; | 210 | }; |
210 | 211 | ||
211 | SYSCALL_DEFINE4(signalfd4, int, ufd, sigset_t __user *, user_mask, | 212 | SYSCALL_DEFINE4(signalfd4, int, ufd, sigset_t __user *, user_mask, |
diff --git a/fs/squashfs/dir.c b/fs/squashfs/dir.c index 12b933ac6585..0dc340aa2be9 100644 --- a/fs/squashfs/dir.c +++ b/fs/squashfs/dir.c | |||
@@ -230,5 +230,6 @@ failed_read: | |||
230 | 230 | ||
231 | const struct file_operations squashfs_dir_ops = { | 231 | const struct file_operations squashfs_dir_ops = { |
232 | .read = generic_read_dir, | 232 | .read = generic_read_dir, |
233 | .readdir = squashfs_readdir | 233 | .readdir = squashfs_readdir, |
234 | .llseek = default_llseek, | ||
234 | }; | 235 | }; |
diff --git a/fs/timerfd.c b/fs/timerfd.c index b86ab8eff79a..8c4fc1425b3e 100644 --- a/fs/timerfd.c +++ b/fs/timerfd.c | |||
@@ -144,6 +144,7 @@ static const struct file_operations timerfd_fops = { | |||
144 | .release = timerfd_release, | 144 | .release = timerfd_release, |
145 | .poll = timerfd_poll, | 145 | .poll = timerfd_poll, |
146 | .read = timerfd_read, | 146 | .read = timerfd_read, |
147 | .llseek = noop_llseek, | ||
147 | }; | 148 | }; |
148 | 149 | ||
149 | static struct file *timerfd_fget(int fd) | 150 | static struct file *timerfd_fget(int fd) |
diff --git a/fs/ubifs/debug.c b/fs/ubifs/debug.c index c2a68baa782f..c6c553fd0b3d 100644 --- a/fs/ubifs/debug.c +++ b/fs/ubifs/debug.c | |||
@@ -2625,6 +2625,7 @@ static const struct file_operations dfs_fops = { | |||
2625 | .open = open_debugfs_file, | 2625 | .open = open_debugfs_file, |
2626 | .write = write_debugfs_file, | 2626 | .write = write_debugfs_file, |
2627 | .owner = THIS_MODULE, | 2627 | .owner = THIS_MODULE, |
2628 | .llseek = default_llseek, | ||
2628 | }; | 2629 | }; |
2629 | 2630 | ||
2630 | /** | 2631 | /** |