diff --git a/fs/overlayfs/export.c b/fs/overlayfs/export.c index 9df455ca59a8ed2ca1acf451e295b053a5e8a39b..97a916ea8b86ab89390ec1fe6dd25043d74e8212 100644 --- a/fs/overlayfs/export.c +++ b/fs/overlayfs/export.c @@ -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);