Skip to content

Commit

Permalink
cifs: pass the dentry instead of the inode down to the revalidation c…
Browse files Browse the repository at this point in the history
…heck functions

Needed for the final patch in the directory caching series

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
  • Loading branch information
Ronnie Sahlberg authored and Steve French committed Apr 25, 2021
1 parent ed20f54 commit ed8561f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions fs/cifs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2188,8 +2188,9 @@ cifs_rename2(struct user_namespace *mnt_userns, struct inode *source_dir,
}

static bool
cifs_inode_needs_reval(struct inode *inode)
cifs_dentry_needs_reval(struct dentry *dentry)
{
struct inode *inode = d_inode(dentry);
struct cifsInodeInfo *cifs_i = CIFS_I(inode);
struct cifs_sb_info *cifs_sb = CIFS_SB(inode->i_sb);

Expand Down Expand Up @@ -2300,10 +2301,10 @@ cifs_zap_mapping(struct inode *inode)
int cifs_revalidate_file_attr(struct file *filp)
{
int rc = 0;
struct inode *inode = file_inode(filp);
struct dentry *dentry = file_dentry(filp);
struct cifsFileInfo *cfile = (struct cifsFileInfo *) filp->private_data;

if (!cifs_inode_needs_reval(inode))
if (!cifs_dentry_needs_reval(dentry))
return rc;

if (tlink_tcon(cfile->tlink)->unix_ext)
Expand All @@ -2327,7 +2328,7 @@ int cifs_revalidate_dentry_attr(struct dentry *dentry)
if (inode == NULL)
return -ENOENT;

if (!cifs_inode_needs_reval(inode))
if (!cifs_dentry_needs_reval(dentry))
return rc;

xid = get_xid();
Expand Down

0 comments on commit ed8561f

Please sign in to comment.