Skip to content

Commit 4189b86

Browse files
committed
Merge branch 'work.lookup' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
Pull proc_fill_cache regression fix from Al Viro: "Regression fix for proc_fill_cache() braino introduced when switching instantiate() callback to d_splice_alias()" * 'work.lookup' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: fix proc_fill_cache() in case of d_alloc_parallel() failure
2 parents a94fc25 + d85b399 commit 4189b86

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/proc/base.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1866,19 +1866,19 @@ bool proc_fill_cache(struct file *file, struct dir_context *ctx,
18661866
struct dentry *res;
18671867
res = instantiate(child, task, ptr);
18681868
d_lookup_done(child);
1869-
if (IS_ERR(res))
1870-
goto end_instantiate;
18711869
if (unlikely(res)) {
18721870
dput(child);
18731871
child = res;
1872+
if (IS_ERR(child))
1873+
goto end_instantiate;
18741874
}
18751875
}
18761876
}
18771877
inode = d_inode(child);
18781878
ino = inode->i_ino;
18791879
type = inode->i_mode >> 12;
1880-
end_instantiate:
18811880
dput(child);
1881+
end_instantiate:
18821882
return dir_emit(ctx, name, len, ino, type);
18831883
}
18841884

0 commit comments

Comments
 (0)