From: Linus Torvalds Date: Fri, 15 Sep 2017 01:13:32 +0000 (-0700) Subject: Merge branch 'work.set_fs' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=581bfce969cbfc7ce43ee92273be9cb7c3fdfa61;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git Merge branch 'work.set_fs' of git://git./linux/kernel/git/viro/vfs 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 --- 581bfce969cbfc7ce43ee92273be9cb7c3fdfa61 diff --cc fs/exec.c index daa19d85c066,15fb4d56cc43..69a543259aa5 --- a/fs/exec.c +++ 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 61b58c7b6531,cbdccaf032c6..a2b9a47235c5 --- a/fs/read_write.c +++ b/fs/read_write.c @@@ -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; @@@ -978,10 -1000,9 +1000,9 @@@ } 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; diff --cc include/linux/fs.h index 33d8e45cd874,355cf02830a0..6e187cba94c3 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@@ -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,