smb: client: don't clobber ->i_rdev from cached reparse points

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>
This commit is contained in:
Paulo Alcantara 2024-01-19 01:08:29 -03:00 committed by Steve French
parent f83709b9e0
commit 66c9314b61

View File

@ -133,14 +133,14 @@ retry:
* Query dir responses don't provide enough * Query dir responses don't provide enough
* information about reparse points other than * information about reparse points other than
* their reparse tags. Save an invalidation by * their reparse tags. Save an invalidation by
* not clobbering the existing mode, size and * not clobbering some existing attributes when
* symlink target (if any) when reparse tag and * reparse tag and ctime haven't changed.
* ctime haven't changed.
*/ */
rc = 0; rc = 0;
if (fattr->cf_cifsattrs & ATTR_REPARSE) { if (fattr->cf_cifsattrs & ATTR_REPARSE) {
if (likely(reparse_inode_match(inode, fattr))) { if (likely(reparse_inode_match(inode, fattr))) {
fattr->cf_mode = inode->i_mode; fattr->cf_mode = inode->i_mode;
fattr->cf_rdev = inode->i_rdev;
fattr->cf_eof = CIFS_I(inode)->server_eof; fattr->cf_eof = CIFS_I(inode)->server_eof;
fattr->cf_symlink_target = NULL; fattr->cf_symlink_target = NULL;
} else { } else {