fs: push i_mutex and filemap_write_and_wait down into ->fsync() handlers
[firefly-linux-kernel-4.4.55.git] / Documentation / filesystems / Locking
index 61b31acb9176b35bc77c914b2b3913abbcc9e78a..ca7e25292542a6934f4d3210846167e4343228c4 100644 (file)
@@ -52,7 +52,7 @@ ata *);
        void (*put_link) (struct dentry *, struct nameidata *, void *);
        void (*truncate) (struct inode *);
        int (*permission) (struct inode *, int, unsigned int);
-       int (*check_acl)(struct inode *, int, unsigned int);
+       int (*check_acl)(struct inode *, int);
        int (*setattr) (struct dentry *, struct iattr *);
        int (*getattr) (struct vfsmount *, struct dentry *, struct kstat *);
        int (*setxattr) (struct dentry *, const char *,const void *,size_t,int);
@@ -104,7 +104,7 @@ of the locking scheme for directory operations.
 prototypes:
        struct inode *(*alloc_inode)(struct super_block *sb);
        void (*destroy_inode)(struct inode *);
-       void (*dirty_inode) (struct inode *);
+       void (*dirty_inode) (struct inode *, int flags);
        int (*write_inode) (struct inode *, struct writeback_control *wbc);
        int (*drop_inode) (struct inode *);
        void (*evict_inode) (struct inode *);
@@ -126,7 +126,7 @@ locking rules:
                        s_umount
 alloc_inode:
 destroy_inode:
-dirty_inode:                           (must not sleep)
+dirty_inode:
 write_inode:
 drop_inode:                            !!!inode->i_lock!!!
 evict_inode:
@@ -412,7 +412,7 @@ prototypes:
        int (*open) (struct inode *, struct file *);
        int (*flush) (struct file *);
        int (*release) (struct inode *, struct file *);
-       int (*fsync) (struct file *, int datasync);
+       int (*fsync) (struct file *, loff_t start, loff_t end, int datasync);
        int (*aio_fsync) (struct kiocb *, int datasync);
        int (*fasync) (int, struct file *, int);
        int (*lock) (struct file *, int, struct file_lock *);
@@ -438,9 +438,7 @@ prototypes:
 
 locking rules:
        All may block except for ->setlease.
-       No VFS locks held on entry except for ->fsync and ->setlease.
-
-->fsync() has i_mutex on inode.
+       No VFS locks held on entry except for ->setlease.
 
 ->setlease has the file_list_lock held and must not sleep.