Merge branch 'master' into wrapfs
authorAndrew Burford <aburford@cs.stonybrook.edu>
Tue, 10 May 2022 15:40:20 +0000 (11:40 -0400)
committerAndrew Burford <aburford@cs.stonybrook.edu>
Tue, 10 May 2022 15:40:20 +0000 (11:40 -0400)
1  2 
MAINTAINERS
fs/Kconfig
fs/Makefile
fs/read_write.c
include/linux/namei.h
include/uapi/linux/magic.h

diff --cc MAINTAINERS
index 4c7ba16c9a9d3cd5add29af50c6e9085fd44de84,0cce91cd562439d4ee4cf4874a5439fb4e1d90ce..47c5d1b2dd0e9538f47a4811cd08435716016074
@@@ -17904,21 -19771,12 +19771,21 @@@ F:        sound/soc/codecs/wm
  WORKQUEUE
  M:    Tejun Heo <tj@kernel.org>
  R:    Lai Jiangshan <jiangshanlai@gmail.com>
- 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
  
 +WRAP FILE SYSTEM
 +M:    Erez Zadok <ezk@cs.sunysb.edu>
 +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 <hdegoede@redhat.com>
  S:    Maintained
diff --cc fs/Kconfig
Simple merge
diff --cc fs/Makefile
Simple merge
diff --cc fs/read_write.c
index d33c77e3cf3c789ec4b7b6ee7aa3a70d6ac90414,9db7adf160d206d58cefe9c308513f476bc5d6e4..02148009b7028ed3ee6792aa0098650dbf15949e
@@@ -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)
index 80655b920a8f495b9730a000e7cd75802720b4e6,b9605b2b46e7141f4a6366e787f70b7c19839909..a2714a071225f152a6eebf0ffb0494e79ad5ede9
@@@ -55,9 -66,6 +66,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);
Simple merge