diff options
| author | Enzo Matsumiya <ematsumiya@suse.de> | 2025-09-09 09:57:20 -0300 |
|---|---|---|
| committer | Enzo Matsumiya <ematsumiya@suse.de> | 2025-10-07 10:57:58 -0300 |
| commit | 13d5f16c9f03d35738b944af2ce6916691253b32 (patch) | |
| tree | 9a46f6a879bf355fb90ed4abb29a8cf3d5d80a3d | |
| parent | 790ab04490f63805eb7c7b4a1ce591351a5572b3 (diff) | |
| download | linux-13d5f16c9f03d35738b944af2ce6916691253b32.tar.gz linux-13d5f16c9f03d35738b944af2ce6916691253b32.tar.bz2 linux-13d5f16c9f03d35738b944af2ce6916691253b32.zip | |
smb: client: remove cached_dirent->fattr
Replace with ->unique_id and ->dtype -- the only fields used from
cifs_fattr.
Signed-off-by: Enzo Matsumiya <ematsumiya@suse.de>
| -rw-r--r-- | fs/smb/client/cached_dir.h | 6 | ||||
| -rw-r--r-- | fs/smb/client/readdir.c | 9 |
2 files changed, 8 insertions, 7 deletions
diff --git a/fs/smb/client/cached_dir.h b/fs/smb/client/cached_dir.h index de1231bdb0d9..86a1a927a521 100644 --- a/fs/smb/client/cached_dir.h +++ b/fs/smb/client/cached_dir.h @@ -8,13 +8,15 @@ #ifndef _CACHED_DIR_H #define _CACHED_DIR_H - struct cached_dirent { struct list_head entry; char *name; int namelen; loff_t pos; - struct cifs_fattr fattr; + + /* filled from cifs_fattr */ + u64 unique_id; + unsigned int dtype; }; struct cached_dirents { diff --git a/fs/smb/client/readdir.c b/fs/smb/client/readdir.c index 32dcbb702b14..96b5074d72a5 100644 --- a/fs/smb/client/readdir.c +++ b/fs/smb/client/readdir.c @@ -850,9 +850,7 @@ static bool emit_cached_dirents(struct cached_dirents *cde, * initial scan. */ ctx->pos = dirent->pos; - rc = dir_emit(ctx, dirent->name, dirent->namelen, - dirent->fattr.cf_uniqueid, - dirent->fattr.cf_dtype); + rc = dir_emit(ctx, dirent->name, dirent->namelen, dirent->unique_id, dirent->dtype); if (!rc) return rc; ctx->pos++; @@ -905,9 +903,10 @@ static bool add_cached_dirent(struct cached_dirents *cde, cde->is_failed = 1; return false; } - de->pos = ctx->pos; - memcpy(&de->fattr, fattr, sizeof(struct cifs_fattr)); + de->pos = ctx->pos; + de->unique_id = fattr->cf_uniqueid; + de->dtype = fattr->cf_dtype; list_add_tail(&de->entry, &cde->entries); /* update accounting */ |
