NFS: Clean up function nfs_mark_dir_for_revalidate()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 8 Mar 2021 19:42:53 +0000 (14:42 -0500)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Mon, 8 Mar 2021 21:01:02 +0000 (16:01 -0500)
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
fs/nfs/dir.c
fs/nfs/inode.c
fs/nfs/internal.h

index a91f324cca49f02cedad23cefc42364a2c5346bf..02ac982846f4431b848effa5ccac2ed91b9f9932 100644 (file)
@@ -1403,10 +1403,8 @@ out_force:
 
 static void nfs_mark_dir_for_revalidate(struct inode *inode)
 {
-       struct nfs_inode *nfsi = NFS_I(inode);
-
        spin_lock(&inode->i_lock);
-       nfsi->cache_validity |= NFS_INO_REVAL_PAGECACHE;
+       nfs_set_cache_invalid(inode, NFS_INO_REVAL_PAGECACHE);
        spin_unlock(&inode->i_lock);
 }
 
index 749bbea14d99a00c6cd62654aa61dead6b9351fd..d21bfaac10b0db706c1628f4c64f1e1bf8d556ef 100644 (file)
@@ -207,7 +207,7 @@ static bool nfs_has_xattr_cache(const struct nfs_inode *nfsi)
 }
 #endif
 
-static void nfs_set_cache_invalid(struct inode *inode, unsigned long flags)
+void nfs_set_cache_invalid(struct inode *inode, unsigned long flags)
 {
        struct nfs_inode *nfsi = NFS_I(inode);
        bool have_delegation = NFS_PROTO(inode)->have_delegation(inode, FMODE_READ);
index 25fb43b69e5a45df09334d6cbf206c2f21687552..7b644d6c09e4b27d8e0e5a25d75f91202ea72049 100644 (file)
@@ -411,7 +411,8 @@ extern int nfs_write_inode(struct inode *, struct writeback_control *);
 extern int nfs_drop_inode(struct inode *);
 extern void nfs_clear_inode(struct inode *);
 extern void nfs_evict_inode(struct inode *);
-void nfs_zap_acl_cache(struct inode *inode);
+extern void nfs_zap_acl_cache(struct inode *inode);
+extern void nfs_set_cache_invalid(struct inode *inode, unsigned long flags);
 extern bool nfs_check_cache_invalid(struct inode *, unsigned long);
 extern int nfs_wait_bit_killable(struct wait_bit_key *key, int mode);
 extern int nfs_wait_atomic_killable(atomic_t *p, unsigned int mode);