From: NeilBrown <[email protected]> cifs uses the results of readdir to prime the dcache. Using d_alloc_parallel() can block if there is a concurrent lookup. Blocking in that case is pointless as the lookup will add info to the dcache and there is no value in the readdir waiting to see if it should add the info too.
Also this call to d_alloc_parallel() is made while the parent directory is locked. A proposed change to locking will lock the parent later, after d_alloc_parallel(). This means it won't be safe to wait in d_alloc_parallel() while holding the directory lock. So change to use d_alloc_noblock(). Signed-off-by: NeilBrown <[email protected]> --- fs/smb/client/readdir.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/smb/client/readdir.c b/fs/smb/client/readdir.c index 47f5d620b750..dabf9507bc40 100644 --- a/fs/smb/client/readdir.c +++ b/fs/smb/client/readdir.c @@ -104,7 +104,7 @@ cifs_prime_dcache(struct dentry *parent, struct qstr *name, (fattr->cf_flags & CIFS_FATTR_NEED_REVAL)) return; - dentry = d_alloc_parallel(parent, name); + dentry = d_alloc_noblock(parent, name); } if (IS_ERR(dentry)) return; -- 2.50.0.107.gf914562f5916.dirty
