diff options
author | Ronnie Sahlberg <lsahlber@redhat.com> | 2022-10-18 17:39:10 +1000 |
---|---|---|
committer | Steve French <stfrench@microsoft.com> | 2022-10-19 17:57:41 -0500 |
commit | 8e77860c62b6eac8bb5b567efe6b8cd232d5f72f (patch) | |
tree | cddd5d8128c02ebe156070c0767a90aaf70a3baf /fs/cifs/cached_dir.h | |
parent | 096bbeec7bd6fb683831a9ca4850a6b6a3f04740 (diff) |
cifs: drop the lease for cached directories on rmdir or rename
When we delete or rename a directory we must also drop any cached lease we have
on the directory.
Fixes: a350d6e73f5e ("cifs: enable caching of directories for which a lease is held")
Reviewed-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/cifs/cached_dir.h')
-rw-r--r-- | fs/cifs/cached_dir.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/cifs/cached_dir.h b/fs/cifs/cached_dir.h index e536304ca2ce..2f4e764c9ca9 100644 --- a/fs/cifs/cached_dir.h +++ b/fs/cifs/cached_dir.h @@ -69,6 +69,10 @@ extern int open_cached_dir_by_dentry(struct cifs_tcon *tcon, struct dentry *dentry, struct cached_fid **cfid); extern void close_cached_dir(struct cached_fid *cfid); +extern void drop_cached_dir_by_name(const unsigned int xid, + struct cifs_tcon *tcon, + const char *name, + struct cifs_sb_info *cifs_sb); extern void close_all_cached_dirs(struct cifs_sb_info *cifs_sb); extern void invalidate_all_cached_dirs(struct cifs_tcon *tcon); extern int cached_dir_lease_break(struct cifs_tcon *tcon, __u8 lease_key[16]); |