Message ID | 1376692475-28413-117-git-send-email-kamal@canonical.com |
---|---|
State | New |
Headers | show |
diff --git a/fs/cifs/readdir.c b/fs/cifs/readdir.c index cdd6ff4..5e636a8 100644 --- a/fs/cifs/readdir.c +++ b/fs/cifs/readdir.c @@ -113,6 +113,14 @@ cifs_prime_dcache(struct dentry *parent, struct qstr *name, return; } + /* + * 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; + dentry = d_alloc(parent, name); if (!dentry) return;