Skip to content

Commit fd6d3fe

Browse files
Trond Myklebustamschuma-ntap
authored andcommitted
NFS: Clean up function nfs_mark_dir_for_revalidate()
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
1 parent 4739791 commit fd6d3fe

3 files changed

Lines changed: 4 additions & 5 deletions

File tree

fs/nfs/dir.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1403,10 +1403,8 @@ int nfs_lookup_verify_inode(struct inode *inode, unsigned int flags)
14031403

14041404
static void nfs_mark_dir_for_revalidate(struct inode *inode)
14051405
{
1406-
struct nfs_inode *nfsi = NFS_I(inode);
1407-
14081406
spin_lock(&inode->i_lock);
1409-
nfsi->cache_validity |= NFS_INO_REVAL_PAGECACHE;
1407+
nfs_set_cache_invalid(inode, NFS_INO_REVAL_PAGECACHE);
14101408
spin_unlock(&inode->i_lock);
14111409
}
14121410

fs/nfs/inode.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ static bool nfs_has_xattr_cache(const struct nfs_inode *nfsi)
207207
}
208208
#endif
209209

210-
static void nfs_set_cache_invalid(struct inode *inode, unsigned long flags)
210+
void nfs_set_cache_invalid(struct inode *inode, unsigned long flags)
211211
{
212212
struct nfs_inode *nfsi = NFS_I(inode);
213213
bool have_delegation = NFS_PROTO(inode)->have_delegation(inode, FMODE_READ);

fs/nfs/internal.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,7 +411,8 @@ extern int nfs_write_inode(struct inode *, struct writeback_control *);
411411
extern int nfs_drop_inode(struct inode *);
412412
extern void nfs_clear_inode(struct inode *);
413413
extern void nfs_evict_inode(struct inode *);
414-
void nfs_zap_acl_cache(struct inode *inode);
414+
extern void nfs_zap_acl_cache(struct inode *inode);
415+
extern void nfs_set_cache_invalid(struct inode *inode, unsigned long flags);
415416
extern bool nfs_check_cache_invalid(struct inode *, unsigned long);
416417
extern int nfs_wait_bit_killable(struct wait_bit_key *key, int mode);
417418
extern int nfs_wait_atomic_killable(atomic_t *p, unsigned int mode);

0 commit comments

Comments
 (0)