Set 0 as lookup flag argument when calling lookup_positive_unlocked(), because we don't hope to drop negative dentry in lookup. Signed-off-by: Chengguang Xu <cgxu519@xxxxxxxxxxxx> --- fs/kernfs/mount.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/kernfs/mount.c b/fs/kernfs/mount.c index 9dc7e7a64e10..3162d2bf39b3 100644 --- a/fs/kernfs/mount.c +++ b/fs/kernfs/mount.c @@ -224,7 +224,7 @@ struct dentry *kernfs_node_dentry(struct kernfs_node *kn, return ERR_PTR(-EINVAL); } dtmp = lookup_positive_unlocked(kntmp->name, dentry, - strlen(kntmp->name)); + strlen(kntmp->name), 0); dput(dentry); if (IS_ERR(dtmp)) return dtmp; -- 2.20.1