diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-03 15:41:18 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2015-04-11 22:29:40 -0400 |
commit | 5d5d568975307877e9195f5305f4240e506a2807 (patch) | |
tree | b58d5b1af9e77189357b95f5cb0dc635bba65285 /drivers | |
parent | 86cc05840a0da1afcb6b8151b53f3b606457c91b (diff) |
make new_sync_{read,write}() static
All places outside of core VFS that checked ->read and ->write for being NULL or
called the methods directly are gone now, so NULL {read,write} with non-NULL
{read,write}_iter will do the right thing in all cases.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/mem.c | 2 | ||||
-rw-r--r-- | drivers/char/raw.c | 2 | ||||
-rw-r--r-- | drivers/net/macvtap.c | 2 | ||||
-rw-r--r-- | drivers/net/tun.c | 2 | ||||
-rw-r--r-- | drivers/staging/lustre/lustre/llite/file.c | 6 | ||||
-rw-r--r-- | drivers/usb/gadget/function/f_fs.c | 2 | ||||
-rw-r--r-- | drivers/usb/gadget/legacy/inode.c | 2 |
7 files changed, 0 insertions, 18 deletions
diff --git a/drivers/char/mem.c b/drivers/char/mem.c index 9c4fd7a8e2e5..ad08400491ae 100644 --- a/drivers/char/mem.c +++ b/drivers/char/mem.c | |||
@@ -764,7 +764,6 @@ static const struct file_operations __maybe_unused port_fops = { | |||
764 | 764 | ||
765 | static const struct file_operations zero_fops = { | 765 | static const struct file_operations zero_fops = { |
766 | .llseek = zero_lseek, | 766 | .llseek = zero_lseek, |
767 | .read = new_sync_read, | ||
768 | .write = write_zero, | 767 | .write = write_zero, |
769 | .read_iter = read_iter_zero, | 768 | .read_iter = read_iter_zero, |
770 | .aio_write = aio_write_zero, | 769 | .aio_write = aio_write_zero, |
@@ -776,7 +775,6 @@ static const struct file_operations zero_fops = { | |||
776 | 775 | ||
777 | static const struct file_operations full_fops = { | 776 | static const struct file_operations full_fops = { |
778 | .llseek = full_lseek, | 777 | .llseek = full_lseek, |
779 | .read = new_sync_read, | ||
780 | .read_iter = read_iter_zero, | 778 | .read_iter = read_iter_zero, |
781 | .write = write_full, | 779 | .write = write_full, |
782 | }; | 780 | }; |
diff --git a/drivers/char/raw.c b/drivers/char/raw.c index 6e29bf2db536..5fc291c6157e 100644 --- a/drivers/char/raw.c +++ b/drivers/char/raw.c | |||
@@ -282,9 +282,7 @@ static long raw_ctl_compat_ioctl(struct file *file, unsigned int cmd, | |||
282 | #endif | 282 | #endif |
283 | 283 | ||
284 | static const struct file_operations raw_fops = { | 284 | static const struct file_operations raw_fops = { |
285 | .read = new_sync_read, | ||
286 | .read_iter = blkdev_read_iter, | 285 | .read_iter = blkdev_read_iter, |
287 | .write = new_sync_write, | ||
288 | .write_iter = blkdev_write_iter, | 286 | .write_iter = blkdev_write_iter, |
289 | .fsync = blkdev_fsync, | 287 | .fsync = blkdev_fsync, |
290 | .open = raw_open, | 288 | .open = raw_open, |
diff --git a/drivers/net/macvtap.c b/drivers/net/macvtap.c index 8362aef0c15e..9c91ff872485 100644 --- a/drivers/net/macvtap.c +++ b/drivers/net/macvtap.c | |||
@@ -1118,8 +1118,6 @@ static const struct file_operations macvtap_fops = { | |||
1118 | .owner = THIS_MODULE, | 1118 | .owner = THIS_MODULE, |
1119 | .open = macvtap_open, | 1119 | .open = macvtap_open, |
1120 | .release = macvtap_release, | 1120 | .release = macvtap_release, |
1121 | .read = new_sync_read, | ||
1122 | .write = new_sync_write, | ||
1123 | .read_iter = macvtap_read_iter, | 1121 | .read_iter = macvtap_read_iter, |
1124 | .write_iter = macvtap_write_iter, | 1122 | .write_iter = macvtap_write_iter, |
1125 | .poll = macvtap_poll, | 1123 | .poll = macvtap_poll, |
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index b96b94cee760..e470ae59d405 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -2223,8 +2223,6 @@ static void tun_chr_show_fdinfo(struct seq_file *m, struct file *f) | |||
2223 | static const struct file_operations tun_fops = { | 2223 | static const struct file_operations tun_fops = { |
2224 | .owner = THIS_MODULE, | 2224 | .owner = THIS_MODULE, |
2225 | .llseek = no_llseek, | 2225 | .llseek = no_llseek, |
2226 | .read = new_sync_read, | ||
2227 | .write = new_sync_write, | ||
2228 | .read_iter = tun_chr_read_iter, | 2226 | .read_iter = tun_chr_read_iter, |
2229 | .write_iter = tun_chr_write_iter, | 2227 | .write_iter = tun_chr_write_iter, |
2230 | .poll = tun_chr_poll, | 2228 | .poll = tun_chr_poll, |
diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index 5ebee6ca0a10..d73111ef949e 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c | |||
@@ -3128,9 +3128,7 @@ int ll_inode_permission(struct inode *inode, int mask) | |||
3128 | 3128 | ||
3129 | /* -o localflock - only provides locally consistent flock locks */ | 3129 | /* -o localflock - only provides locally consistent flock locks */ |
3130 | struct file_operations ll_file_operations = { | 3130 | struct file_operations ll_file_operations = { |
3131 | .read = new_sync_read, | ||
3132 | .read_iter = ll_file_read_iter, | 3131 | .read_iter = ll_file_read_iter, |
3133 | .write = new_sync_write, | ||
3134 | .write_iter = ll_file_write_iter, | 3132 | .write_iter = ll_file_write_iter, |
3135 | .unlocked_ioctl = ll_file_ioctl, | 3133 | .unlocked_ioctl = ll_file_ioctl, |
3136 | .open = ll_file_open, | 3134 | .open = ll_file_open, |
@@ -3143,9 +3141,7 @@ struct file_operations ll_file_operations = { | |||
3143 | }; | 3141 | }; |
3144 | 3142 | ||
3145 | struct file_operations ll_file_operations_flock = { | 3143 | struct file_operations ll_file_operations_flock = { |
3146 | .read = new_sync_read, | ||
3147 | .read_iter = ll_file_read_iter, | 3144 | .read_iter = ll_file_read_iter, |
3148 | .write = new_sync_write, | ||
3149 | .write_iter = ll_file_write_iter, | 3145 | .write_iter = ll_file_write_iter, |
3150 | .unlocked_ioctl = ll_file_ioctl, | 3146 | .unlocked_ioctl = ll_file_ioctl, |
3151 | .open = ll_file_open, | 3147 | .open = ll_file_open, |
@@ -3161,9 +3157,7 @@ struct file_operations ll_file_operations_flock = { | |||
3161 | 3157 | ||
3162 | /* These are for -o noflock - to return ENOSYS on flock calls */ | 3158 | /* These are for -o noflock - to return ENOSYS on flock calls */ |
3163 | struct file_operations ll_file_operations_noflock = { | 3159 | struct file_operations ll_file_operations_noflock = { |
3164 | .read = new_sync_read, | ||
3165 | .read_iter = ll_file_read_iter, | 3160 | .read_iter = ll_file_read_iter, |
3166 | .write = new_sync_write, | ||
3167 | .write_iter = ll_file_write_iter, | 3161 | .write_iter = ll_file_write_iter, |
3168 | .unlocked_ioctl = ll_file_ioctl, | 3162 | .unlocked_ioctl = ll_file_ioctl, |
3169 | .open = ll_file_open, | 3163 | .open = ll_file_open, |
diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index a12315a78248..6bdb57069044 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget/function/f_fs.c | |||
@@ -1061,8 +1061,6 @@ static const struct file_operations ffs_epfile_operations = { | |||
1061 | .llseek = no_llseek, | 1061 | .llseek = no_llseek, |
1062 | 1062 | ||
1063 | .open = ffs_epfile_open, | 1063 | .open = ffs_epfile_open, |
1064 | .write = new_sync_write, | ||
1065 | .read = new_sync_read, | ||
1066 | .write_iter = ffs_epfile_write_iter, | 1064 | .write_iter = ffs_epfile_write_iter, |
1067 | .read_iter = ffs_epfile_read_iter, | 1065 | .read_iter = ffs_epfile_read_iter, |
1068 | .release = ffs_epfile_release, | 1066 | .release = ffs_epfile_release, |
diff --git a/drivers/usb/gadget/legacy/inode.c b/drivers/usb/gadget/legacy/inode.c index 662ef2c1c62b..6af58c6dba5e 100644 --- a/drivers/usb/gadget/legacy/inode.c +++ b/drivers/usb/gadget/legacy/inode.c | |||
@@ -699,8 +699,6 @@ static const struct file_operations ep_io_operations = { | |||
699 | .open = ep_open, | 699 | .open = ep_open, |
700 | .release = ep_release, | 700 | .release = ep_release, |
701 | .llseek = no_llseek, | 701 | .llseek = no_llseek, |
702 | .read = new_sync_read, | ||
703 | .write = new_sync_write, | ||
704 | .unlocked_ioctl = ep_ioctl, | 702 | .unlocked_ioctl = ep_ioctl, |
705 | .read_iter = ep_read_iter, | 703 | .read_iter = ep_read_iter, |
706 | .write_iter = ep_write_iter, | 704 | .write_iter = ep_write_iter, |