From: Andrew Burford Date: Tue, 10 May 2022 16:00:19 +0000 (-0400) Subject: Merge branch 'master' into wrapfs X-Git-Url: https://git.fsl.cs.stonybrook.edu/?a=commitdiff_plain;h=1642bb2d021e848cc652094912cf4ec25d3fcec3;p=wrapfs-5.14.y.git Merge branch 'master' into wrapfs --- 1642bb2d021e848cc652094912cf4ec25d3fcec3 diff --cc MAINTAINERS index 4c7ba16c9a9d,d7b4f32875a9..759c8c0de764 --- a/MAINTAINERS +++ b/MAINTAINERS @@@ -17904,21 -20069,22 +20069,31 @@@ F: sound/soc/codecs/wm WORKQUEUE M: Tejun Heo R: Lai Jiangshan - T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git S: Maintained + T: git git://git.kernel.org/pub/scm/linux/kernel/git/tj/wq.git + F: Documentation/core-api/workqueue.rst F: include/linux/workqueue.h F: kernel/workqueue.c - F: Documentation/core-api/workqueue.rst + + WWAN DRIVERS + M: Loic Poulain + M: Sergey Ryazanov + R: Johannes Berg + L: netdev@vger.kernel.org + S: Maintained + F: drivers/net/wwan/ + F: include/linux/wwan.h + F: include/uapi/linux/wwan.h +WRAP FILE SYSTEM +M: Erez Zadok +L: wrapfs@filesystems.org +W: https://wrapfs.filesystems.org/ +T: git git://git.fsl.cs.sunysb.edu/wrapfs-latest.git +S: Maintained +F: Documentation/filesystems/wrapfs.txt +F: fs/wrapfs/ + X-POWERS AXP288 PMIC DRIVERS M: Hans de Goede S: Maintained diff --cc fs/read_write.c index d33c77e3cf3c,9db7adf160d2..02148009b702 --- a/fs/read_write.c +++ b/fs/read_write.c @@@ -455,20 -485,24 +485,25 @@@ ssize_t vfs_read(struct file *file, cha return -EFAULT; ret = rw_verify_area(READ, file, pos, count); - if (!ret) { - if (count > MAX_RW_COUNT) - count = MAX_RW_COUNT; - ret = __vfs_read(file, buf, count, pos); - if (ret > 0) { - fsnotify_access(file); - add_rchar(current, ret); - } - inc_syscr(current); - } + if (ret) + return ret; + if (count > MAX_RW_COUNT) + count = MAX_RW_COUNT; + if (file->f_op->read) + ret = file->f_op->read(file, buf, count, pos); + else if (file->f_op->read_iter) + ret = new_sync_read(file, buf, count, pos); + else + ret = -EINVAL; + if (ret > 0) { + fsnotify_access(file); + add_rchar(current, ret); + } + inc_syscr(current); return ret; } +EXPORT_SYMBOL(vfs_read); static ssize_t new_sync_write(struct file *filp, const char __user *buf, size_t len, loff_t *ppos) { @@@ -552,22 -594,25 +595,26 @@@ ssize_t vfs_write(struct file *file, co return -EFAULT; ret = rw_verify_area(WRITE, file, pos, count); - if (!ret) { - if (count > MAX_RW_COUNT) - count = MAX_RW_COUNT; - file_start_write(file); - ret = __vfs_write(file, buf, count, pos); - if (ret > 0) { - fsnotify_modify(file); - add_wchar(current, ret); - } - inc_syscw(current); - file_end_write(file); + if (ret) + return ret; + if (count > MAX_RW_COUNT) + count = MAX_RW_COUNT; + file_start_write(file); + if (file->f_op->write) + ret = file->f_op->write(file, buf, count, pos); + else if (file->f_op->write_iter) + ret = new_sync_write(file, buf, count, pos); + else + ret = -EINVAL; + if (ret > 0) { + fsnotify_modify(file); + add_wchar(current, ret); } - + inc_syscw(current); + file_end_write(file); return ret; } +EXPORT_SYMBOL(vfs_write); /* file_ppos returns &file->f_pos or NULL if file is stream */ static inline loff_t *file_ppos(struct file *file) diff --cc include/linux/namei.h index 80655b920a8f,be9a2b349ca7..00bc3c0b08a8 --- a/include/linux/namei.h +++ b/include/linux/namei.h @@@ -55,9 -63,6 +63,8 @@@ extern struct dentry *kern_path_create( extern struct dentry *user_path_create(int, const char __user *, struct path *, unsigned int); extern void done_path_create(struct path *, struct dentry *); extern struct dentry *kern_path_locked(const char *, struct path *); - extern int kern_path_mountpoint(int, const char *, struct path *, unsigned int); +extern int vfs_path_lookup(struct dentry *, struct vfsmount *, + const char *, unsigned int, struct path *); extern struct dentry *try_lookup_one_len(const char *, struct dentry *, int); extern struct dentry *lookup_one_len(const char *, struct dentry *, int);