aboutsummaryrefslogtreecommitdiffstats
path: root/fs/proc/base.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-04-20 16:31:31 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2016-05-02 19:49:29 -0400
commit3781764b5cb109152af180a4f17cd3a24d5bc51f (patch)
treedfd7482d959625031f5afb2c5a41b446f2001fc6 /fs/proc/base.c
parent6192269444ebfbfb42e23c7a6a93c76ffe4b5e51 (diff)
proc_fill_cache(): switch to d_alloc_parallel()
... making it usable with directory locked shared Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/proc/base.c')
-rw-r--r--fs/proc/base.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c
index b1755b23893e..15b60f1a346d 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
@@ -1819,12 +1819,17 @@ bool proc_fill_cache(struct file *file, struct dir_context *ctx,
1819 1819
1820 child = d_hash_and_lookup(dir, &qname); 1820 child = d_hash_and_lookup(dir, &qname);
1821 if (!child) { 1821 if (!child) {
1822 child = d_alloc(dir, &qname); 1822 DECLARE_WAIT_QUEUE_HEAD_ONSTACK(wq);
1823 if (!child) 1823 child = d_alloc_parallel(dir, &qname, &wq);
1824 goto end_instantiate; 1824 if (IS_ERR(child))
1825 if (instantiate(d_inode(dir), child, task, ptr) < 0) {
1826 dput(child);
1827 goto end_instantiate; 1825 goto end_instantiate;
1826 if (d_in_lookup(child)) {
1827 int err = instantiate(d_inode(dir), child, task, ptr);
1828 d_lookup_done(child);
1829 if (err < 0) {
1830 dput(child);
1831 goto end_instantiate;
1832 }
1828 } 1833 }
1829 } 1834 }
1830 inode = d_inode(child); 1835 inode = d_inode(child);