Skip to content

Commit

Permalink
smb: client: don't clobber ->i_rdev from cached reparse points
Browse files Browse the repository at this point in the history
Don't clobber ->i_rdev from valid reparse inodes over readdir(2) as it
can't be provided by query dir responses.

Signed-off-by: Paulo Alcantara <pc@manguebit.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
  • Loading branch information
Paulo Alcantara authored and Steve French committed Jan 19, 2024
1 parent f83709b commit 66c9314
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/smb/client/readdir.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,14 +133,14 @@ cifs_prime_dcache(struct dentry *parent, struct qstr *name,
* Query dir responses don't provide enough
* information about reparse points other than
* their reparse tags. Save an invalidation by
* not clobbering the existing mode, size and
* symlink target (if any) when reparse tag and
* ctime haven't changed.
* not clobbering some existing attributes when
* reparse tag and ctime haven't changed.
*/
rc = 0;
if (fattr->cf_cifsattrs & ATTR_REPARSE) {
if (likely(reparse_inode_match(inode, fattr))) {
fattr->cf_mode = inode->i_mode;
fattr->cf_rdev = inode->i_rdev;
fattr->cf_eof = CIFS_I(inode)->server_eof;
fattr->cf_symlink_target = NULL;
} else {
Expand Down

0 comments on commit 66c9314

Please sign in to comment.