mirror of
https://github.com/torvalds/linux.git
synced 2026-11-26 08:23:17 +00:00
cifs: always update the inode cache with the results from a FIND_*
When we get back a FIND_FIRST/NEXT result, we have some info about the dentry that we use to instantiate a new inode. We were ignoring and discarding that info when we had an existing dentry in the cache. Fix this by updating the inode in place when we find an existing dentry and the uniqueid is the same. Cc: <[email protected]> # .31.x Reported-and-Tested-by: Andrew Bartlett <[email protected]> Reported-by: Bill Robertson <[email protected]> Reported-by: Dion Edwards <[email protected]> Signed-off-by: Jeff Layton <[email protected]> Signed-off-by: Steve French <[email protected]>
This commit is contained in:
committed by
Steve French
parent
3cf003c08b
commit
cd60042cc1
+5
-2
@@ -86,9 +86,12 @@ cifs_readdir_lookup(struct dentry *parent, struct qstr *name,
|
||||
|
||||
dentry = d_lookup(parent, name);
|
||||
if (dentry) {
|
||||
/* FIXME: check for inode number changes? */
|
||||
if (dentry->d_inode != NULL)
|
||||
inode = dentry->d_inode;
|
||||
/* update inode in place if i_ino didn't change */
|
||||
if (inode && CIFS_I(inode)->uniqueid == fattr->cf_uniqueid) {
|
||||
cifs_fattr_to_inode(inode, fattr);
|
||||
return dentry;
|
||||
}
|
||||
d_drop(dentry);
|
||||
dput(dentry);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user