Skip to content

Commit 66c9314

Browse files
Paulo Alcantarasmfrench
authored andcommitted
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 <[email protected]> Signed-off-by: Steve French <[email protected]>
1 parent f83709b commit 66c9314

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/smb/client/readdir.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,14 @@ cifs_prime_dcache(struct dentry *parent, struct qstr *name,
133133
* Query dir responses don't provide enough
134134
* information about reparse points other than
135135
* their reparse tags. Save an invalidation by
136-
* not clobbering the existing mode, size and
137-
* symlink target (if any) when reparse tag and
138-
* ctime haven't changed.
136+
* not clobbering some existing attributes when
137+
* reparse tag and ctime haven't changed.
139138
*/
140139
rc = 0;
141140
if (fattr->cf_cifsattrs & ATTR_REPARSE) {
142141
if (likely(reparse_inode_match(inode, fattr))) {
143142
fattr->cf_mode = inode->i_mode;
143+
fattr->cf_rdev = inode->i_rdev;
144144
fattr->cf_eof = CIFS_I(inode)->server_eof;
145145
fattr->cf_symlink_target = NULL;
146146
} else {

0 commit comments

Comments
 (0)