diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/cifs/readdir.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index a4217f02fab..6406ac902de 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c @@ -96,6 +96,14 @@ cifs_readdir_lookup(struct dentry *parent, struct qstr *name, dput(dentry); } + /* + * If we know that the inode will need to be revalidated immediately, + * then don't create a new dentry for it. We'll end up doing an on + * the wire call either way and this spares us an invalidation. + */ + if (fattr->cf_flags & CIFS_FATTR_NEED_REVAL) + return NULL; + dentry = d_alloc(parent, name); if (dentry == NULL) return NULL; |