summaryrefslogtreecommitdiffstats
path: root/fs/cifs
diff options
context:
space:
mode:
authorRonnie Sahlberg <lsahlber@redhat.com>2021-03-09 00:07:34 +0100
committerSteve French <stfrench@microsoft.com>2021-04-25 23:28:24 +0200
commited8561fa1d12b4f880e2d8287cb69b3a0c238069 (patch)
treeb5f0e36e223725f87de92cd9dbfbdc49a13c1e6e /fs/cifs
parentcifs: add a timestamp to track when the lease of the cached dir was taken (diff)
downloadlinux-ed8561fa1d12b4f880e2d8287cb69b3a0c238069.tar.xz
linux-ed8561fa1d12b4f880e2d8287cb69b3a0c238069.zip
cifs: pass the dentry instead of the inode down to the revalidation check 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>
Diffstat (limited to 'fs/cifs')
-rw-r--r--fs/cifs/inode.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c
index fe3a50a39f41..22662eada74f 100644
--- a/fs/cifs/inode.c
+++ b/fs/cifs/inode.c
@@ -2188,8 +2188,9 @@ cifs_rename_exit:
}
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);
@@ -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)
@@ -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();