make new_sync_{read,write}() static
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 3 Apr 2015 19:41:18 +0000 (15:41 -0400)
committerAl Viro <viro@zeniv.linux.org.uk>
Sun, 12 Apr 2015 02:29:40 +0000 (22:29 -0400)
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>
59 files changed:
Documentation/filesystems/porting
arch/s390/hypfs/inode.c
drivers/char/mem.c
drivers/char/raw.c
drivers/net/macvtap.c
drivers/net/tun.c
drivers/staging/lustre/lustre/llite/file.c
drivers/usb/gadget/function/f_fs.c
drivers/usb/gadget/legacy/inode.c
fs/9p/vfs_file.c
fs/adfs/file.c
fs/affs/file.c
fs/afs/file.c
fs/bfs/file.c
fs/block_dev.c
fs/btrfs/file.c
fs/ceph/file.c
fs/cifs/cifsfs.c
fs/coda/file.c
fs/ecryptfs/file.c
fs/exofs/file.c
fs/ext2/file.c
fs/ext3/file.c
fs/ext4/file.c
fs/f2fs/file.c
fs/fat/file.c
fs/fuse/cuse.c
fs/fuse/file.c
fs/gfs2/file.c
fs/hfs/inode.c
fs/hfsplus/inode.c
fs/hostfs/hostfs_kern.c
fs/hpfs/file.c
fs/hugetlbfs/inode.c
fs/jffs2/file.c
fs/jfs/file.c
fs/logfs/file.c
fs/minix/file.c
fs/ncpfs/file.c
fs/nfs/file.c
fs/nfs/nfs4file.c
fs/nilfs2/file.c
fs/ntfs/file.c
fs/ocfs2/file.c
fs/omfs/file.c
fs/pipe.c
fs/ramfs/file-mmu.c
fs/ramfs/file-nommu.c
fs/read_write.c
fs/reiserfs/file.c
fs/romfs/mmap-nommu.c
fs/sysv/file.c
fs/ubifs/file.c
fs/udf/file.c
fs/ufs/file.c
fs/xfs/xfs_file.c
include/linux/fs.h
mm/shmem.c
net/socket.c

index fa2db081505e6d6d581ea4ee6d8f1eaab56a3482..4006483c275fd3b33c6ed9322ea7c22b728de3f6 100644 (file)
@@ -471,3 +471,12 @@ in your dentry operations instead.
 [mandatory]
        f_dentry is gone; use f_path.dentry, or, better yet, see if you can avoid
        it entirely.
+--
+[mandatory]
+       never call ->read() and ->write() directly; use __vfs_{read,write} or
+       wrappers; instead of checking for ->write or ->read being NULL, look for
+       FMODE_CAN_{WRITE,READ} in file->f_mode.
+--
+[mandatory]
+       do _not_ use new_sync_{read,write} for ->read/->write; leave it NULL
+       instead.
index df7d8cbee377a229c5f609d92ea7b72045c9cc86..3f5c799b7fb53aecc3af6cf8b877705cb0e8bd0e 100644 (file)
@@ -437,8 +437,6 @@ struct dentry *hypfs_create_str(struct dentry *dir,
 static const struct file_operations hypfs_file_ops = {
        .open           = hypfs_open,
        .release        = hypfs_release,
-       .read           = new_sync_read,
-       .write          = new_sync_write,
        .read_iter      = hypfs_read_iter,
        .write_iter     = hypfs_write_iter,
        .llseek         = no_llseek,
index 9c4fd7a8e2e5c466e6df5144082a22b868214d9f..ad08400491aefa7c0924894f8bb4d7ec90c4778f 100644 (file)
@@ -764,7 +764,6 @@ static const struct file_operations __maybe_unused port_fops = {
 
 static const struct file_operations zero_fops = {
        .llseek         = zero_lseek,
-       .read           = new_sync_read,
        .write          = write_zero,
        .read_iter      = read_iter_zero,
        .aio_write      = aio_write_zero,
@@ -776,7 +775,6 @@ static const struct file_operations zero_fops = {
 
 static const struct file_operations full_fops = {
        .llseek         = full_lseek,
-       .read           = new_sync_read,
        .read_iter      = read_iter_zero,
        .write          = write_full,
 };
index 6e29bf2db5367732eaf68f05d1c75dd22adf7966..5fc291c6157e3121f57d0a30e8d52a5021e3253c 100644 (file)
@@ -282,9 +282,7 @@ static long raw_ctl_compat_ioctl(struct file *file, unsigned int cmd,
 #endif
 
 static const struct file_operations raw_fops = {
-       .read           = new_sync_read,
        .read_iter      = blkdev_read_iter,
-       .write          = new_sync_write,
        .write_iter     = blkdev_write_iter,
        .fsync          = blkdev_fsync,
        .open           = raw_open,
index 8362aef0c15e534241babfddbcd6cd6912ed1a8c..9c91ff8724851d5d284bd8c5b128f94d57e1537e 100644 (file)
@@ -1118,8 +1118,6 @@ static const struct file_operations macvtap_fops = {
        .owner          = THIS_MODULE,
        .open           = macvtap_open,
        .release        = macvtap_release,
-       .read           = new_sync_read,
-       .write          = new_sync_write,
        .read_iter      = macvtap_read_iter,
        .write_iter     = macvtap_write_iter,
        .poll           = macvtap_poll,
index b96b94cee76035cc6131d402f85d63ca2c0421e7..e470ae59d40536fe7530774cb473ebe57000f9a8 100644 (file)
@@ -2223,8 +2223,6 @@ static void tun_chr_show_fdinfo(struct seq_file *m, struct file *f)
 static const struct file_operations tun_fops = {
        .owner  = THIS_MODULE,
        .llseek = no_llseek,
-       .read  = new_sync_read,
-       .write = new_sync_write,
        .read_iter  = tun_chr_read_iter,
        .write_iter = tun_chr_write_iter,
        .poll   = tun_chr_poll,
index 5ebee6ca0a108330711cd02aefea5f87eaccd771..d73111ef949eee71f8e696b3e800be03f0e2dc1d 100644 (file)
@@ -3128,9 +3128,7 @@ int ll_inode_permission(struct inode *inode, int mask)
 
 /* -o localflock - only provides locally consistent flock locks */
 struct file_operations ll_file_operations = {
-       .read      = new_sync_read,
        .read_iter = ll_file_read_iter,
-       .write    = new_sync_write,
        .write_iter = ll_file_write_iter,
        .unlocked_ioctl = ll_file_ioctl,
        .open      = ll_file_open,
@@ -3143,9 +3141,7 @@ struct file_operations ll_file_operations = {
 };
 
 struct file_operations ll_file_operations_flock = {
-       .read      = new_sync_read,
        .read_iter    = ll_file_read_iter,
-       .write    = new_sync_write,
        .write_iter   = ll_file_write_iter,
        .unlocked_ioctl = ll_file_ioctl,
        .open      = ll_file_open,
@@ -3161,9 +3157,7 @@ struct file_operations ll_file_operations_flock = {
 
 /* These are for -o noflock - to return ENOSYS on flock calls */
 struct file_operations ll_file_operations_noflock = {
-       .read      = new_sync_read,
        .read_iter    = ll_file_read_iter,
-       .write    = new_sync_write,
        .write_iter   = ll_file_write_iter,
        .unlocked_ioctl = ll_file_ioctl,
        .open      = ll_file_open,
index a12315a78248d4a40349586062e043b8574d1308..6bdb5706904497ca9eccb7fd5d979c67824d8600 100644 (file)
@@ -1061,8 +1061,6 @@ static const struct file_operations ffs_epfile_operations = {
        .llseek =       no_llseek,
 
        .open =         ffs_epfile_open,
-       .write =        new_sync_write,
-       .read =         new_sync_read,
        .write_iter =   ffs_epfile_write_iter,
        .read_iter =    ffs_epfile_read_iter,
        .release =      ffs_epfile_release,
index 662ef2c1c62b67d0340cbf8593d515f14f2568dc..6af58c6dba5ebe7ea134197537864b95c8bfe002 100644 (file)
@@ -699,8 +699,6 @@ static const struct file_operations ep_io_operations = {
        .open =         ep_open,
        .release =      ep_release,
        .llseek =       no_llseek,
-       .read =         new_sync_read,
-       .write =        new_sync_write,
        .unlocked_ioctl = ep_ioctl,
        .read_iter =    ep_read_iter,
        .write_iter =   ep_write_iter,
index 55cc9c80e1874d38e49bbbad537f719a19003572..d7fcb775311e5a1697a2d8866a5a9f2bb25eb99a 100644 (file)
@@ -641,8 +641,6 @@ static const struct vm_operations_struct v9fs_mmap_file_vm_ops = {
 
 const struct file_operations v9fs_cached_file_operations = {
        .llseek = generic_file_llseek,
-       .read = new_sync_read,
-       .write = new_sync_write,
        .read_iter = generic_file_read_iter,
        .write_iter = generic_file_write_iter,
        .open = v9fs_file_open,
@@ -654,8 +652,6 @@ const struct file_operations v9fs_cached_file_operations = {
 
 const struct file_operations v9fs_cached_file_operations_dotl = {
        .llseek = generic_file_llseek,
-       .read = new_sync_read,
-       .write = new_sync_write,
        .read_iter = generic_file_read_iter,
        .write_iter = generic_file_write_iter,
        .open = v9fs_file_open,
@@ -668,8 +664,6 @@ const struct file_operations v9fs_cached_file_operations_dotl = {
 
 const struct file_operations v9fs_file_operations = {
        .llseek = generic_file_llseek,
-       .read = new_sync_read,
-       .write = new_sync_write,
        .read_iter = v9fs_file_read_iter,
        .write_iter = v9fs_file_write_iter,
        .open = v9fs_file_open,
@@ -681,8 +675,6 @@ const struct file_operations v9fs_file_operations = {
 
 const struct file_operations v9fs_file_operations_dotl = {
        .llseek = generic_file_llseek,
-       .read = new_sync_read,
-       .write = new_sync_write,
        .read_iter = v9fs_file_read_iter,
        .write_iter = v9fs_file_write_iter,
        .open = v9fs_file_open,
@@ -695,8 +687,6 @@ const struct file_operations v9fs_file_operations_dotl = {
 
 const struct file_operations v9fs_mmap_file_operations = {
        .llseek = generic_file_llseek,
-       .read = new_sync_read,
-       .write = new_sync_write,
        .read_iter = v9fs_mmap_file_read_iter,
        .write_iter = v9fs_mmap_file_write_iter,
        .open = v9fs_file_open,
@@ -708,8 +698,6 @@ const struct file_operations v9fs_mmap_file_operations = {
 
 const struct file_operations v9fs_mmap_file_operations_dotl = {
        .llseek = generic_file_llseek,
-       .read = new_sync_read,
-       .write = new_sync_write,
        .read_iter = v9fs_mmap_file_read_iter,
        .write_iter = v9fs_mmap_file_write_iter,
        .open = v9fs_file_open,
index 07c9edce5aa768ddeb7ae203c8c9cab489ea8417..46c0d5671cd541d8bafdc9327f2fbf99d0f5133a 100644 (file)
 
 const struct file_operations adfs_file_operations = {
        .llseek         = generic_file_llseek,
-       .read           = new_sync_read,
        .read_iter      = generic_file_read_iter,
        .mmap           = generic_file_mmap,
        .fsync          = generic_file_fsync,
-       .write          = new_sync_write,
        .write_iter     = generic_file_write_iter,
        .splice_read    = generic_file_splice_read,
 };
index 3aa7eb66547ea31b7556c1502d3900dce0aa80dd..7c1a3d4c19c23cd0fd2e9452d813b1014f0233fd 100644 (file)
@@ -969,9 +969,7 @@ int affs_file_fsync(struct file *filp, loff_t start, loff_t end, int datasync)
 }
 const struct file_operations affs_file_operations = {
        .llseek         = generic_file_llseek,
-       .read           = new_sync_read,
        .read_iter      = generic_file_read_iter,
-       .write          = new_sync_write,
        .write_iter     = generic_file_write_iter,
        .mmap           = generic_file_mmap,
        .open           = affs_file_open,
index 932ce07948b387d7aa75dffb3a9de1e21f1f50b8..999bc3caec9276b8148448d4ec2eadb0badbf3f0 100644 (file)
@@ -31,8 +31,6 @@ const struct file_operations afs_file_operations = {
        .open           = afs_open,
        .release        = afs_release,
        .llseek         = generic_file_llseek,
-       .read           = new_sync_read,
-       .write          = new_sync_write,
        .read_iter      = generic_file_read_iter,
        .write_iter     = afs_file_write,
        .mmap           = generic_file_readonly_mmap,
index e7f88ace1a2508d260ea8feae3addc5e2752980c..97f1b51601550e38c8c4e45bf49c4336da04bed9 100644 (file)
@@ -23,9 +23,7 @@
 
 const struct file_operations bfs_file_operations = {
        .llseek         = generic_file_llseek,
-       .read           = new_sync_read,
        .read_iter      = generic_file_read_iter,
-       .write          = new_sync_write,
        .write_iter     = generic_file_write_iter,
        .mmap           = generic_file_mmap,
        .splice_read    = generic_file_splice_read,
index 2e522aed6584d3a7837155897b2a47085b5ed303..b5e87896f517d17aea743eec62cdfeada14db203 100644 (file)
@@ -1659,8 +1659,6 @@ const struct file_operations def_blk_fops = {
        .open           = blkdev_open,
        .release        = blkdev_close,
        .llseek         = block_llseek,
-       .read           = new_sync_read,
-       .write          = new_sync_write,
        .read_iter      = blkdev_read_iter,
        .write_iter     = blkdev_write_iter,
        .mmap           = generic_file_mmap,
index aee18f84e3159c1e369a0c14eff0baad8ddbb59a..cdc801c8510570a650a17212427b92d35823fab5 100644 (file)
@@ -2806,8 +2806,6 @@ out:
 
 const struct file_operations btrfs_file_operations = {
        .llseek         = btrfs_file_llseek,
-       .read           = new_sync_read,
-       .write          = new_sync_write,
        .read_iter      = generic_file_read_iter,
        .splice_read    = generic_file_splice_read,
        .write_iter     = btrfs_file_write_iter,
index 139f2fea91a0fe8472cf138e900bfe580db43f50..56237ea5fc227580580e8f27a308e97a7fb1c07b 100644 (file)
@@ -1331,8 +1331,6 @@ const struct file_operations ceph_file_fops = {
        .open = ceph_open,
        .release = ceph_release,
        .llseek = ceph_llseek,
-       .read = new_sync_read,
-       .write = new_sync_write,
        .read_iter = ceph_read_iter,
        .write_iter = ceph_write_iter,
        .mmap = ceph_mmap,
index d72fe37f5420e03c7677e86fe2e26d478277d1ae..eaab4b2a05953225ea92075c95dd2e0174d3d75b 100644 (file)
@@ -906,8 +906,6 @@ const struct inode_operations cifs_symlink_inode_ops = {
 };
 
 const struct file_operations cifs_file_ops = {
-       .read = new_sync_read,
-       .write = new_sync_write,
        .read_iter = cifs_loose_read_iter,
        .write_iter = cifs_file_write_iter,
        .open = cifs_open,
@@ -926,8 +924,6 @@ const struct file_operations cifs_file_ops = {
 };
 
 const struct file_operations cifs_file_strict_ops = {
-       .read = new_sync_read,
-       .write = new_sync_write,
        .read_iter = cifs_strict_readv,
        .write_iter = cifs_strict_writev,
        .open = cifs_open,
@@ -947,8 +943,6 @@ const struct file_operations cifs_file_strict_ops = {
 
 const struct file_operations cifs_file_direct_ops = {
        /* BB reevaluate whether they can be done with directio, no cache */
-       .read = new_sync_read,
-       .write = new_sync_write,
        .read_iter = cifs_user_readv,
        .write_iter = cifs_user_writev,
        .open = cifs_open,
@@ -967,8 +961,6 @@ const struct file_operations cifs_file_direct_ops = {
 };
 
 const struct file_operations cifs_file_nobrl_ops = {
-       .read = new_sync_read,
-       .write = new_sync_write,
        .read_iter = cifs_loose_read_iter,
        .write_iter = cifs_file_write_iter,
        .open = cifs_open,
@@ -986,8 +978,6 @@ const struct file_operations cifs_file_nobrl_ops = {
 };
 
 const struct file_operations cifs_file_strict_nobrl_ops = {
-       .read = new_sync_read,
-       .write = new_sync_write,
        .read_iter = cifs_strict_readv,
        .write_iter = cifs_strict_writev,
        .open = cifs_open,
@@ -1006,8 +996,6 @@ const struct file_operations cifs_file_strict_nobrl_ops = {
 
 const struct file_operations cifs_file_direct_nobrl_ops = {
        /* BB reevaluate whether they can be done with directio, no cache */
-       .read = new_sync_read,
-       .write = new_sync_write,
        .read_iter = cifs_user_readv,
        .write_iter = cifs_user_writev,
        .open = cifs_open,
index d9f1d9a85e045532cf02ed243759f1f74cf41ff3..1da3805f3ddcdb209a6b357e12aacac35809dda9 100644 (file)
@@ -219,8 +219,6 @@ int coda_fsync(struct file *coda_file, loff_t start, loff_t end, int datasync)
 
 const struct file_operations coda_file_operations = {
        .llseek         = generic_file_llseek,
-       .read           = new_sync_read,
-       .write          = new_sync_write,
        .read_iter      = coda_file_read_iter,
        .write_iter     = coda_file_write_iter,
        .mmap           = coda_file_mmap,
index 79675089443df98c23de1602d3ca59a887cbb4d4..a65786e26b05ac97dbaab6a6258e533aa842cece 100644 (file)
@@ -358,9 +358,7 @@ const struct file_operations ecryptfs_dir_fops = {
 
 const struct file_operations ecryptfs_main_fops = {
        .llseek = generic_file_llseek,
-       .read = new_sync_read,
        .read_iter = ecryptfs_read_update_atime,
-       .write = new_sync_write,
        .write_iter = generic_file_write_iter,
        .iterate = ecryptfs_readdir,
        .unlocked_ioctl = ecryptfs_unlocked_ioctl,
index 1a376b42d30582c81a9f4d0b3f4dc85b74968cb0..906de66e8e7e067e6179aa3408c6e6aa8ea528b7 100644 (file)
@@ -67,8 +67,6 @@ static int exofs_flush(struct file *file, fl_owner_t id)
 
 const struct file_operations exofs_file_operations = {
        .llseek         = generic_file_llseek,
-       .read           = new_sync_read,
-       .write          = new_sync_write,
        .read_iter      = generic_file_read_iter,
        .write_iter     = generic_file_write_iter,
        .mmap           = generic_file_mmap,
index e31701713516c7f24dee6847badf0e4098b947c8..ef04fdb57dbf823ef6a2dfa9ad46d72727388d50 100644 (file)
@@ -92,8 +92,6 @@ int ext2_fsync(struct file *file, loff_t start, loff_t end, int datasync)
  */
 const struct file_operations ext2_file_operations = {
        .llseek         = generic_file_llseek,
-       .read           = new_sync_read,
-       .write          = new_sync_write,
        .read_iter      = generic_file_read_iter,
        .write_iter     = generic_file_write_iter,
        .unlocked_ioctl = ext2_ioctl,
@@ -111,8 +109,6 @@ const struct file_operations ext2_file_operations = {
 #ifdef CONFIG_FS_DAX
 const struct file_operations ext2_dax_file_operations = {
        .llseek         = generic_file_llseek,
-       .read           = new_sync_read,
-       .write          = new_sync_write,
        .read_iter      = generic_file_read_iter,
        .write_iter     = generic_file_write_iter,
        .unlocked_ioctl = ext2_ioctl,
index a062fa1e1b113e56e7545bb4c6bac7ac1bf7d741..3b8f650de22ce2b917d97d3c0b22717726d593fa 100644 (file)
@@ -50,8 +50,6 @@ static int ext3_release_file (struct inode * inode, struct file * filp)
 
 const struct file_operations ext3_file_operations = {
        .llseek         = generic_file_llseek,
-       .read           = new_sync_read,
-       .write          = new_sync_write,
        .read_iter      = generic_file_read_iter,
        .write_iter     = generic_file_write_iter,
        .unlocked_ioctl = ext3_ioctl,
index 598abbbe678619c347dbe53d8dfe2c8cd6c86c65..9ad03036d9f566d2e932f8fc9f76718f6c289c74 100644 (file)
@@ -607,8 +607,6 @@ loff_t ext4_llseek(struct file *file, loff_t offset, int whence)
 
 const struct file_operations ext4_file_operations = {
        .llseek         = ext4_llseek,
-       .read           = new_sync_read,
-       .write          = new_sync_write,
        .read_iter      = generic_file_read_iter,
        .write_iter     = ext4_file_write_iter,
        .unlocked_ioctl = ext4_ioctl,
@@ -627,8 +625,6 @@ const struct file_operations ext4_file_operations = {
 #ifdef CONFIG_FS_DAX
 const struct file_operations ext4_dax_file_operations = {
        .llseek         = ext4_llseek,
-       .read           = new_sync_read,
-       .write          = new_sync_write,
        .read_iter      = generic_file_read_iter,
        .write_iter     = ext4_file_write_iter,
        .unlocked_ioctl = ext4_ioctl,
index 98dac27bc3f733975fabc96404ab30a916b20e7c..df6a0596eccf210dfefbaaca2cf2f60ca57a7f6b 100644 (file)
@@ -1104,8 +1104,6 @@ long f2fs_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 
 const struct file_operations f2fs_file_operations = {
        .llseek         = f2fs_llseek,
-       .read           = new_sync_read,
-       .write          = new_sync_write,
        .read_iter      = generic_file_read_iter,
        .write_iter     = generic_file_write_iter,
        .open           = generic_file_open,
index 8429c68e30578150b7dd85667a4b04f8e0d2ed4b..1e98d333879f9952c77af87b1fe1e84177e2f6ee 100644 (file)
@@ -170,8 +170,6 @@ int fat_file_fsync(struct file *filp, loff_t start, loff_t end, int datasync)
 
 const struct file_operations fat_file_operations = {
        .llseek         = generic_file_llseek,
-       .read           = new_sync_read,
-       .write          = new_sync_write,
        .read_iter      = generic_file_read_iter,
        .write_iter     = generic_file_write_iter,
        .mmap           = generic_file_mmap,
index 644f05744993adcf6a35509036ebc8f56d7d3b41..e5bbf748b6987a922fa211e3edb083346927f3b6 100644 (file)
@@ -177,8 +177,6 @@ static long cuse_file_compat_ioctl(struct file *file, unsigned int cmd,
 
 static const struct file_operations cuse_frontend_fops = {
        .owner                  = THIS_MODULE,
-       .read                   = new_sync_read,
-       .write                  = new_sync_write,
        .read_iter              = cuse_read_iter,
        .write_iter             = cuse_write_iter,
        .open                   = cuse_open,
index 727e139e1fea10652a021c0fccd0e9bd6231a639..e1afdd7abf90114fffd61da6bcfcc77916afb950 100644 (file)
@@ -2953,9 +2953,7 @@ out:
 
 static const struct file_operations fuse_file_operations = {
        .llseek         = fuse_file_llseek,
-       .read           = new_sync_read,
        .read_iter      = fuse_file_read_iter,
-       .write          = new_sync_write,
        .write_iter     = fuse_file_write_iter,
        .mmap           = fuse_file_mmap,
        .open           = fuse_open,
@@ -2973,9 +2971,7 @@ static const struct file_operations fuse_file_operations = {
 
 static const struct file_operations fuse_direct_io_file_operations = {
        .llseek         = fuse_file_llseek,
-       .read           = new_sync_read,
        .read_iter      = fuse_direct_read_iter,
-       .write          = new_sync_write,
        .write_iter     = fuse_direct_write_iter,
        .mmap           = fuse_direct_mmap,
        .open           = fuse_open,
index f6fc412b1100e7f1340f6f479ebbcf8e18edca6c..614bb42cb7e1b765ce982ad61c0c51780e93247b 100644 (file)
@@ -1064,9 +1064,7 @@ static int gfs2_flock(struct file *file, int cmd, struct file_lock *fl)
 
 const struct file_operations gfs2_file_fops = {
        .llseek         = gfs2_llseek,
-       .read           = new_sync_read,
        .read_iter      = generic_file_read_iter,
-       .write          = new_sync_write,
        .write_iter     = gfs2_file_write_iter,
        .unlocked_ioctl = gfs2_ioctl,
        .mmap           = gfs2_mmap,
@@ -1096,9 +1094,7 @@ const struct file_operations gfs2_dir_fops = {
 
 const struct file_operations gfs2_file_fops_nolock = {
        .llseek         = gfs2_llseek,
-       .read           = new_sync_read,
        .read_iter      = generic_file_read_iter,
-       .write          = new_sync_write,
        .write_iter     = gfs2_file_write_iter,
        .unlocked_ioctl = gfs2_ioctl,
        .mmap           = gfs2_mmap,
index 98d4ea45bb70aad886641f66d81e0007f0d0e34d..9337065bcc6761280e5abb7b8078811172e3a76b 100644 (file)
@@ -674,9 +674,7 @@ static int hfs_file_fsync(struct file *filp, loff_t start, loff_t end,
 
 static const struct file_operations hfs_file_operations = {
        .llseek         = generic_file_llseek,
-       .read           = new_sync_read,
        .read_iter      = generic_file_read_iter,
-       .write          = new_sync_write,
        .write_iter     = generic_file_write_iter,
        .mmap           = generic_file_mmap,
        .splice_read    = generic_file_splice_read,
index f541196d4ee910a3f9ec6ce26841937c9fa7eb73..5f86cadb0542c074b7015483303d3bdfefe3347f 100644 (file)
@@ -341,9 +341,7 @@ static const struct inode_operations hfsplus_file_inode_operations = {
 
 static const struct file_operations hfsplus_file_operations = {
        .llseek         = generic_file_llseek,
-       .read           = new_sync_read,
        .read_iter      = generic_file_read_iter,
-       .write          = new_sync_write,
        .write_iter     = generic_file_write_iter,
        .mmap           = generic_file_mmap,
        .splice_read    = generic_file_splice_read,
index fd62cae0fdcb66db03712d419c25014312112546..e021188ca110aa9561be325c22724c75034d21f9 100644 (file)
@@ -378,11 +378,9 @@ static int hostfs_fsync(struct file *file, loff_t start, loff_t end,
 
 static const struct file_operations hostfs_file_fops = {
        .llseek         = generic_file_llseek,
-       .read           = new_sync_read,
        .splice_read    = generic_file_splice_read,
        .read_iter      = generic_file_read_iter,
        .write_iter     = generic_file_write_iter,
-       .write          = new_sync_write,
        .mmap           = generic_file_mmap,
        .open           = hostfs_file_open,
        .release        = hostfs_file_release,
index 7f54e5f76cececd4bf76354edb13eb246a81df78..6d8cfe9b52d611b7dadbfa1a38ec7cf3c3b3671c 100644 (file)
@@ -197,9 +197,7 @@ const struct address_space_operations hpfs_aops = {
 const struct file_operations hpfs_file_ops =
 {
        .llseek         = generic_file_llseek,
-       .read           = new_sync_read,
        .read_iter      = generic_file_read_iter,
-       .write          = new_sync_write,
        .write_iter     = generic_file_write_iter,
        .mmap           = generic_file_mmap,
        .release        = hpfs_file_release,
index 5291c14ee6b8c7965b43edd2757114969979ecc0..8c2dad629e7c094d5808a0335b30e8f0b3abf920 100644 (file)
@@ -696,7 +696,6 @@ static void init_once(void *foo)
 }
 
 const struct file_operations hugetlbfs_file_operations = {
-       .read                   = new_sync_read,
        .read_iter              = hugetlbfs_read_iter,
        .mmap                   = hugetlbfs_file_mmap,
        .fsync                  = noop_fsync,
index 64989ca9ba90b71e3a8d16ff90dda67a913cc988..f509f62e12f6ef85e95b5c159353cba757ef4af1 100644 (file)
@@ -51,9 +51,7 @@ const struct file_operations jffs2_file_operations =
 {
        .llseek =       generic_file_llseek,
        .open =         generic_file_open,
-       .read =         new_sync_read,
        .read_iter =    generic_file_read_iter,
-       .write =        new_sync_write,
        .write_iter =   generic_file_write_iter,
        .unlocked_ioctl=jffs2_ioctl,
        .mmap =         generic_file_readonly_mmap,
index 10815f8dfd8b28c31e045d62d0351013ca442a03..ae46788b97231efecb7eaf7d7c0a0b9c779349ef 100644 (file)
@@ -151,8 +151,6 @@ const struct inode_operations jfs_file_inode_operations = {
 const struct file_operations jfs_file_operations = {
        .open           = jfs_open,
        .llseek         = generic_file_llseek,
-       .write          = new_sync_write,
-       .read           = new_sync_read,
        .read_iter      = generic_file_read_iter,
        .write_iter     = generic_file_write_iter,
        .mmap           = generic_file_mmap,
index 8538752df2f6a7dbb3dad0119e4e8bc47f4a25f4..b2c13f739ffa27b8b8a249cadcd025737a512ce6 100644 (file)
@@ -271,8 +271,6 @@ const struct file_operations logfs_reg_fops = {
        .llseek         = generic_file_llseek,
        .mmap           = generic_file_readonly_mmap,
        .open           = generic_file_open,
-       .read           = new_sync_read,
-       .write          = new_sync_write,
 };
 
 const struct address_space_operations logfs_reg_aops = {
index a967de085ac0f4cf7193101cd4e54a08bb4fff50..6d63e27ec961c6ed03b9bbcd46414d4436e065dd 100644 (file)
@@ -14,9 +14,7 @@
  */
 const struct file_operations minix_file_operations = {
        .llseek         = generic_file_llseek,
-       .read           = new_sync_read,
        .read_iter      = generic_file_read_iter,
-       .write          = new_sync_write,
        .write_iter     = generic_file_write_iter,
        .mmap           = generic_file_mmap,
        .fsync          = generic_file_fsync,
index 5f9d5624e377f46517042227d82ce058dd9083ee..479bf8db264e0cd0f253093f957a2ea32f0012a2 100644 (file)
@@ -249,8 +249,6 @@ static int ncp_release(struct inode *inode, struct file *file) {
 const struct file_operations ncp_file_operations =
 {
        .llseek         = generic_file_llseek,
-       .read           = new_sync_read,
-       .write          = new_sync_write,
        .read_iter      = ncp_file_read_iter,
        .write_iter     = ncp_file_write_iter,
        .unlocked_ioctl = ncp_ioctl,
index 37b15582e0de960a966e80fcda3aa1680caa094d..f6a3adedf0270b7edabb23511746a14bbe6d000c 100644 (file)
@@ -926,8 +926,6 @@ EXPORT_SYMBOL_GPL(nfs_flock);
 
 const struct file_operations nfs_file_operations = {
        .llseek         = nfs_file_llseek,
-       .read           = new_sync_read,
-       .write          = new_sync_write,
        .read_iter      = nfs_file_read,
        .write_iter     = nfs_file_write,
        .mmap           = nfs_file_mmap,
index 8b46389c4c5b814806979b66348121afe0590090..0181cde1d102ab5340ef7be230dc2e3ca036993c 100644 (file)
@@ -170,8 +170,6 @@ const struct file_operations nfs4_file_operations = {
 #else
        .llseek         = nfs_file_llseek,
 #endif
-       .read           = new_sync_read,
-       .write          = new_sync_write,
        .read_iter      = nfs_file_read,
        .write_iter     = nfs_file_write,
        .mmap           = nfs_file_mmap,
index a8c728acb7a809b4078c21146ae1c3759c7f7021..54575e3cc1a24eda326fd19bde268bbc1b187f21 100644 (file)
@@ -143,8 +143,6 @@ static int nilfs_file_mmap(struct file *file, struct vm_area_struct *vma)
  */
 const struct file_operations nilfs_file_operations = {
        .llseek         = generic_file_llseek,
-       .read           = new_sync_read,
-       .write          = new_sync_write,
        .read_iter      = generic_file_read_iter,
        .write_iter     = generic_file_write_iter,
        .unlocked_ioctl = nilfs_ioctl,
index c1da78dad1afb389039660aa41064bb6f948fa76..840e95e3f1d271b63fc78049f827f459acf989ec 100644 (file)
@@ -2048,10 +2048,8 @@ static int ntfs_file_fsync(struct file *filp, loff_t start, loff_t end,
 
 const struct file_operations ntfs_file_ops = {
        .llseek         = generic_file_llseek,
-       .read           = new_sync_read,
        .read_iter      = generic_file_read_iter,
 #ifdef NTFS_RW
-       .write          = new_sync_write,
        .write_iter     = ntfs_file_write_iter,
        .fsync          = ntfs_file_fsync,
 #endif /* NTFS_RW */
index 266845de210016e5cc25a71599116f7f1f3b3290..0a6ec7e6efd81b7d31b01d18797a9d6b703ecd59 100644 (file)
@@ -2676,8 +2676,6 @@ const struct inode_operations ocfs2_special_file_iops = {
  */
 const struct file_operations ocfs2_fops = {
        .llseek         = ocfs2_file_llseek,
-       .read           = new_sync_read,
-       .write          = new_sync_write,
        .mmap           = ocfs2_mmap,
        .fsync          = ocfs2_sync_file,
        .release        = ocfs2_file_release,
@@ -2724,8 +2722,6 @@ const struct file_operations ocfs2_dops = {
  */
 const struct file_operations ocfs2_fops_no_plocks = {
        .llseek         = ocfs2_file_llseek,
-       .read           = new_sync_read,
-       .write          = new_sync_write,
        .mmap           = ocfs2_mmap,
        .fsync          = ocfs2_sync_file,
        .release        = ocfs2_file_release,
index 902e88527fcec443244bd12a9a25e1cf895ba763..f993be7f2156fcd863fcc28261add1326efd0146 100644 (file)
@@ -337,8 +337,6 @@ static sector_t omfs_bmap(struct address_space *mapping, sector_t block)
 
 const struct file_operations omfs_file_operations = {
        .llseek = generic_file_llseek,
-       .read = new_sync_read,
-       .write = new_sync_write,
        .read_iter = generic_file_read_iter,
        .write_iter = generic_file_write_iter,
        .mmap = generic_file_mmap,
index 2d084f2d0b83c698a7df720c35d2fdbeadb65fcb..822da5b7cff06610bec61297ad2a3a688faf11b6 100644 (file)
--- a/fs/pipe.c
+++ b/fs/pipe.c
@@ -946,9 +946,7 @@ err:
 const struct file_operations pipefifo_fops = {
        .open           = fifo_open,
        .llseek         = no_llseek,
-       .read           = new_sync_read,
        .read_iter      = pipe_read,
-       .write          = new_sync_write,
        .write_iter     = pipe_write,
        .poll           = pipe_poll,
        .unlocked_ioctl = pipe_ioctl,
index 4f56de822d2f5995b81006e0bc9783d321b1621d..183a212694bf8af77ee3f682137709ebdb38a274 100644 (file)
@@ -31,9 +31,7 @@
 #include "internal.h"
 
 const struct file_operations ramfs_file_operations = {
-       .read           = new_sync_read,
        .read_iter      = generic_file_read_iter,
-       .write          = new_sync_write,
        .write_iter     = generic_file_write_iter,
        .mmap           = generic_file_mmap,
        .fsync          = noop_fsync,
index f6ab41b39612bd4cd04bd49921095443e54150e3..0b38befa69f356b03b34175f9f629feaf4c8d0fa 100644 (file)
@@ -44,9 +44,7 @@ const struct file_operations ramfs_file_operations = {
        .mmap_capabilities      = ramfs_mmap_capabilities,
        .mmap                   = ramfs_nommu_mmap,
        .get_unmapped_area      = ramfs_nommu_get_unmapped_area,
-       .read                   = new_sync_read,
        .read_iter              = generic_file_read_iter,
-       .write                  = new_sync_write,
        .write_iter             = generic_file_write_iter,
        .fsync                  = noop_fsync,
        .splice_read            = generic_file_splice_read,
index c75e6ef0952ca25f9dd4c3ec47ad94f8db3f8726..3ae8eee3b82ab111f1b399fae12da7a40d0cac7e 100644 (file)
@@ -28,7 +28,6 @@ typedef ssize_t (*iter_fn_t)(struct kiocb *, struct iov_iter *);
 
 const struct file_operations generic_ro_fops = {
        .llseek         = generic_file_llseek,
-       .read           = new_sync_read,
        .read_iter      = generic_file_read_iter,
        .mmap           = generic_file_readonly_mmap,
        .splice_read    = generic_file_splice_read,
@@ -428,7 +427,7 @@ ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *pp
 
 EXPORT_SYMBOL(do_sync_read);
 
-ssize_t new_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos)
+static ssize_t new_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos)
 {
        struct iovec iov = { .iov_base = buf, .iov_len = len };
        struct kiocb kiocb;
@@ -445,8 +444,6 @@ ssize_t new_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *p
        return ret;
 }
 
-EXPORT_SYMBOL(new_sync_read);
-
 ssize_t __vfs_read(struct file *file, char __user *buf, size_t count,
                   loff_t *pos)
 {
@@ -505,7 +502,7 @@ ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, lof
 
 EXPORT_SYMBOL(do_sync_write);
 
-ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos)
+static ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos)
 {
        struct iovec iov = { .iov_base = (void __user *)buf, .iov_len = len };
        struct kiocb kiocb;
@@ -522,8 +519,6 @@ ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, lo
        return ret;
 }
 
-EXPORT_SYMBOL(new_sync_write);
-
 ssize_t __vfs_write(struct file *file, const char __user *p, size_t count,
                    loff_t *pos)
 {
index 751dd3f4346b5dab98d7b4861cd24a617c148bae..96a1bcf33db4435098baa153f807a71274543aaf 100644 (file)
@@ -243,8 +243,6 @@ drop_write_lock:
 }
 
 const struct file_operations reiserfs_file_operations = {
-       .read = new_sync_read,
-       .write = new_sync_write,
        .unlocked_ioctl = reiserfs_ioctl,
 #ifdef CONFIG_COMPAT
        .compat_ioctl = reiserfs_compat_ioctl,
index 7da9e2153953eb31399bf3909a9ef881328ddf90..1118a0dc6b45f0292cfdf34970d35c6dfc2e6ba8 100644 (file)
@@ -81,7 +81,6 @@ static unsigned romfs_mmap_capabilities(struct file *file)
 
 const struct file_operations romfs_ro_fops = {
        .llseek                 = generic_file_llseek,
-       .read                   = new_sync_read,
        .read_iter              = generic_file_read_iter,
        .splice_read            = generic_file_splice_read,
        .mmap                   = romfs_mmap,
index b00811c75b24f63acb1651991f6972f4b0b6ff54..a48e30410ad1979eaf1068cd59ddfa2dcc89c69a 100644 (file)
@@ -21,9 +21,7 @@
  */
 const struct file_operations sysv_file_operations = {
        .llseek         = generic_file_llseek,
-       .read           = new_sync_read,
        .read_iter      = generic_file_read_iter,
-       .write          = new_sync_write,
        .write_iter     = generic_file_write_iter,
        .mmap           = generic_file_mmap,
        .fsync          = generic_file_fsync,
index c3d15fe834033d4d080ea408dbbb961f1e4719c6..475b15635f11654f40ddbc23dfc0f76aeb2a1099 100644 (file)
@@ -1580,8 +1580,6 @@ const struct inode_operations ubifs_symlink_inode_operations = {
 
 const struct file_operations ubifs_file_operations = {
        .llseek         = generic_file_llseek,
-       .read           = new_sync_read,
-       .write          = new_sync_write,
        .read_iter      = generic_file_read_iter,
        .write_iter     = ubifs_write_iter,
        .mmap           = ubifs_file_mmap,
index 7f885cc8b0b798dca3239a9f72f87741fd8b023f..74050bff64f4000b745374fccde9a9e3eaec4256 100644 (file)
@@ -240,12 +240,10 @@ static int udf_release_file(struct inode *inode, struct file *filp)
 }
 
 const struct file_operations udf_file_operations = {
-       .read                   = new_sync_read,
        .read_iter              = generic_file_read_iter,
        .unlocked_ioctl         = udf_ioctl,
        .open                   = generic_file_open,
        .mmap                   = generic_file_mmap,
-       .write                  = new_sync_write,
        .write_iter             = udf_file_write_iter,
        .release                = udf_release_file,
        .fsync                  = generic_file_fsync,
index c84ec010a6761ff683e732973bd8780d989e6531..042ddbf110ccf65254c82bcb834c63916c941d81 100644 (file)
@@ -35,9 +35,7 @@
  
 const struct file_operations ufs_file_operations = {
        .llseek         = generic_file_llseek,
-       .read           = new_sync_read,
        .read_iter      = generic_file_read_iter,
-       .write          = new_sync_write,
        .write_iter     = generic_file_write_iter,
        .mmap           = generic_file_mmap,
        .open           = generic_file_open,
index f44212fae65327347db1ba9f8ec1739d30650f44..44856c3b9617c6f658f6ab9b05b5f08be23f2a01 100644 (file)
@@ -1386,8 +1386,6 @@ xfs_file_llseek(
 
 const struct file_operations xfs_file_operations = {
        .llseek         = xfs_file_llseek,
-       .read           = new_sync_read,
-       .write          = new_sync_write,
        .read_iter      = xfs_file_read_iter,
        .write_iter     = xfs_file_write_iter,
        .splice_read    = xfs_file_splice_read,
index 4a1cb00bd80581814b35e479623aa1b800ccd40a..cade1304d27ba5a91f30cba36c1ac3a9596351eb 100644 (file)
@@ -2576,8 +2576,6 @@ extern ssize_t generic_file_direct_write(struct kiocb *, struct iov_iter *, loff
 extern ssize_t generic_perform_write(struct file *, struct iov_iter *, loff_t);
 extern ssize_t do_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos);
 extern ssize_t do_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos);
-extern ssize_t new_sync_read(struct file *filp, char __user *buf, size_t len, loff_t *ppos);
-extern ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos);
 
 ssize_t vfs_iter_read(struct file *file, struct iov_iter *iter, loff_t *ppos);
 ssize_t vfs_iter_write(struct file *file, struct iov_iter *iter, loff_t *ppos);
index 80b360c7bcd1696a77cf74f44b334ce53d367688..1ea2400b52450fccdc526d569d1447657379609d 100644 (file)
@@ -3118,8 +3118,6 @@ static const struct file_operations shmem_file_operations = {
        .mmap           = shmem_mmap,
 #ifdef CONFIG_TMPFS
        .llseek         = shmem_file_llseek,
-       .read           = new_sync_read,
-       .write          = new_sync_write,
        .read_iter      = shmem_file_read_iter,
        .write_iter     = generic_file_write_iter,
        .fsync          = noop_fsync,
index 5b0126234606dac94152b69fb42a571b1f3cc7bf..3e33959f3ce5711863fca7ce1805a4d1cf4ed6e0 100644 (file)
@@ -140,8 +140,6 @@ static ssize_t sock_splice_read(struct file *file, loff_t *ppos,
 static const struct file_operations socket_file_ops = {
        .owner =        THIS_MODULE,
        .llseek =       no_llseek,
-       .read =         new_sync_read,
-       .write =        new_sync_write,
        .read_iter =    sock_read_iter,
        .write_iter =   sock_write_iter,
        .poll =         sock_poll,