Parent dentry can be located on any file system therefore d_hash_and_lookup() can return ERR_PTR Signed-off-by: Vasily Averin <vvs@xxxxxxxxxxxxx> --- fs/namei.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fs/namei.c b/fs/namei.c index a320371899cf..6c97599f307b 100644 --- a/fs/namei.c +++ b/fs/namei.c @@ -2616,6 +2616,8 @@ int path_pts(struct path *path) dput(path->dentry); path->dentry = parent; child = d_hash_and_lookup(parent, &this); + if (IS_ERR(child)) + return PTR_ERR(child); if (!child) return -ENOENT; -- 2.17.1