Merge branch 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
authorLinus Torvalds <torvalds@linux-foundation.org>
Fri, 15 Sep 2017 01:13:32 +0000 (18:13 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 15 Sep 2017 01:13:32 +0000 (18:13 -0700)
Pull more set_fs removal from Al Viro:
 "Christoph's 'use kernel_read and friends rather than open-coding
  set_fs()' series"

* 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
  fs: unexport vfs_readv and vfs_writev
  fs: unexport vfs_read and vfs_write
  fs: unexport __vfs_read/__vfs_write
  lustre: switch to kernel_write
  gadget/f_mass_storage: stop messing with the address limit
  mconsole: switch to kernel_read
  btrfs: switch write_buf to kernel_write
  net/9p: switch p9_fd_read to kernel_write
  mm/nommu: switch do_mmap_private to kernel_read
  serial2002: switch serial2002_tty_write to kernel_{read/write}
  fs: make the buf argument to __kernel_write a void pointer
  fs: fix kernel_write prototype
  fs: fix kernel_read prototype
  fs: move kernel_read to fs/read_write.c
  fs: move kernel_write to fs/read_write.c
  autofs4: switch autofs4_write to __kernel_write
  ashmem: switch to ->read_iter

1  2 
drivers/mtd/nand/nandsim.c
drivers/staging/lustre/lnet/libcfs/tracefile.c
drivers/staging/lustre/lustre/obdclass/kernelcomm.c
fs/binfmt_elf.c
fs/binfmt_elf_fdpic.c
fs/binfmt_flat.c
fs/btrfs/send.c
fs/exec.c
fs/read_write.c
include/linux/fs.h
mm/nommu.c

Simple merge
diff --cc fs/binfmt_elf.c
Simple merge
Simple merge
Simple merge
diff --cc fs/btrfs/send.c
Simple merge
diff --cc fs/exec.c
index daa19d85c066bfbf00a1ce27bfb4de22aa10e466,15fb4d56cc4306221728d5a29c878df8cd955140..69a543259aa527033010f8ff347f7c26084e0db2
+++ b/fs/exec.c
@@@ -1574,10 -1530,10 +1556,10 @@@ int prepare_binprm(struct linux_binprm 
        retval = security_bprm_set_creds(bprm);
        if (retval)
                return retval;
 -      bprm->cred_prepared = 1;
 +      bprm->called_set_creds = 1;
  
        memset(bprm->buf, 0, BINPRM_BUF_SIZE);
-       return kernel_read(bprm->file, 0, bprm->buf, BINPRM_BUF_SIZE);
+       return kernel_read(bprm->file, bprm->buf, BINPRM_BUF_SIZE, &pos);
  }
  
  EXPORT_SYMBOL(prepare_binprm);
diff --cc fs/read_write.c
index 61b58c7b65312743770f993cec8ec366a2766646,cbdccaf032c600fd1575b06c9dc7edc47b0e957c..a2b9a47235c5ba48b4db2bf81d03c1579b562f79
@@@ -959,10 -982,9 +982,9 @@@ ssize_t vfs_readv(struct file *file, co
  
        return ret;
  }
- EXPORT_SYMBOL(vfs_readv);
  
- ssize_t vfs_writev(struct file *file, const struct iovec __user *vec,
+ static ssize_t vfs_writev(struct file *file, const struct iovec __user *vec,
 -                 unsigned long vlen, loff_t *pos, int flags)
 +                 unsigned long vlen, loff_t *pos, rwf_t flags)
  {
        struct iovec iovstack[UIO_FASTIOV];
        struct iovec *iov = iovstack;
        }
        return ret;
  }
- EXPORT_SYMBOL(vfs_writev);
  
  static ssize_t do_readv(unsigned long fd, const struct iovec __user *vec,
 -                      unsigned long vlen, int flags)
 +                      unsigned long vlen, rwf_t flags)
  {
        struct fd f = fdget_pos(fd);
        ssize_t ret = -EBADF;
index 33d8e45cd874b7b25d9fc570b26c6df4dfea83e2,355cf02830a0cf7e4304ba1865e98a621e3c9033..6e187cba94c3f44669f675a318d10826da235a01
@@@ -1757,10 -1757,7 +1757,7 @@@ extern ssize_t __vfs_read(struct file *
  extern ssize_t vfs_read(struct file *, char __user *, size_t, loff_t *);
  extern ssize_t vfs_write(struct file *, const char __user *, size_t, loff_t *);
  extern ssize_t vfs_readv(struct file *, const struct iovec __user *,
 -              unsigned long, loff_t *, int);
 +              unsigned long, loff_t *, rwf_t);
- extern ssize_t vfs_writev(struct file *, const struct iovec __user *,
-               unsigned long, loff_t *, rwf_t);
  extern ssize_t vfs_copy_file_range(struct file *, loff_t , struct file *,
                                   loff_t, size_t, unsigned int);
  extern int vfs_clone_file_prep_inodes(struct inode *inode_in, loff_t pos_in,
diff --cc mm/nommu.c
Simple merge