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, ...@@ -477,8 +477,8 @@ static struct dentry *ovl_lookup_real_inode(struct super_block *sb,
dput(upper); dput(upper);
} }
if (!this) if (IS_ERR_OR_NULL(this))
return NULL; return this;
if (WARN_ON(ovl_dentry_real_at(this, layer->idx) != real)) { if (WARN_ON(ovl_dentry_real_at(this, layer->idx) != real)) {
dput(this); 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