diff options
author | Enzo Matsumiya <ematsumiya@suse.de> | 2025-07-08 15:54:31 -0300 |
---|---|---|
committer | Enzo Matsumiya <ematsumiya@suse.de> | 2025-07-09 03:00:14 -0300 |
commit | a70b71978ca38fcd839cf708cae288c442c14141 (patch) | |
tree | 0b0c893fe653e634e3d69291a7a4336c5c0fc1ba /fs/smb/client/cached_dir.h | |
parent | e835f5ff89e9106fe8c8d1fe8ea3917cea67c016 (diff) | |
download | linux-plk.tar.gz linux-plk.tar.bz2 linux-plk.zip |
smb: client: properly invalidate and reuse cached direntsplk
By properly invalidating cache dir entries allows to determine when
we must or not do a remote open of the dir, reducing the number of
network calls while the cached dir is still valid.
Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
Diffstat (limited to 'fs/smb/client/cached_dir.h')
-rw-r--r-- | fs/smb/client/cached_dir.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/smb/client/cached_dir.h b/fs/smb/client/cached_dir.h index 4390860fc45c..81bdab01c91f 100644 --- a/fs/smb/client/cached_dir.h +++ b/fs/smb/client/cached_dir.h @@ -21,10 +21,6 @@ struct cached_dirent { struct cached_dirents { bool is_valid:1; bool is_failed:1; - struct file *file; /* - * Used to associate the cache with a single - * open file instance. - */ struct mutex de_mutex; loff_t pos; /* Expected ctx->pos */ struct list_head entries; @@ -76,6 +72,7 @@ extern struct cached_fid *init_cached_dir(struct cached_fids *cfids, const char extern int add_cached_dir(struct cifs_tcon *tcon, const char *path, struct cached_fid *cfid); extern struct cached_fid *lookup_cached_dir(struct cached_fids *cfids, const void *key, int type); +extern void invalidate_dirents(struct cached_fid *cfid); extern int open_cached_dir(unsigned int xid, struct cifs_tcon *tcon, const char *path, struct cifs_sb_info *cifs_sb, |