Skip to content

Commit

Permalink
Merge branch 'work.lookup' of git://git.kernel.org/pub/scm/linux/kern…
Browse files Browse the repository at this point in the history
…el/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
  • Loading branch information
torvalds committed Jun 8, 2018
2 parents a94fc25 + d85b399 commit 4189b86
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/proc/base.c
Original file line number Diff line number Diff line change
Expand Up @@ -1866,19 +1866,19 @@ bool proc_fill_cache(struct file *file, struct dir_context *ctx,
struct dentry *res;
res = instantiate(child, task, ptr);
d_lookup_done(child);
if (IS_ERR(res))
goto end_instantiate;
if (unlikely(res)) {
dput(child);
child = res;
if (IS_ERR(child))
goto end_instantiate;
}
}
}
inode = d_inode(child);
ino = inode->i_ino;
type = inode->i_mode >> 12;
end_instantiate:
dput(child);
end_instantiate:
return dir_emit(ctx, name, len, ino, type);
}

Expand Down

0 comments on commit 4189b86

Please sign in to comment.