Commit 7168179f authored by Amir Goldstein's avatar Amir Goldstein Committed by Miklos Szeredi

ovl: check ERR_PTR() return value from ovl_lookup_real()

Reported-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Fixes: 06170154 ("ovl: lookup indexed ancestor of lower dir")
Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent 2ca3c148
......@@ -477,8 +477,8 @@ static struct dentry *ovl_lookup_real_inode(struct super_block *sb,
dput(upper);
}
if (!this)
return NULL;
if (IS_ERR_OR_NULL(this))
return this;
if (WARN_ON(ovl_dentry_real_at(this, layer->idx) != real)) {
dput(this);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment