ovl: Put upperdentry if ovl_check_origin() fails

If ovl_check_origin() fails, we should put upperdentry. We have a reference
on it by now. So goto out_put_upper instead of out.

Fixes: a9d019573e ("ovl: lookup non-dir copy-up-origin by file handle")
Cc: <stable@vger.kernel.org> #4.12
Signed-off-by: Vivek Goyal <vgoyal@redhat.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
Vivek Goyal 2017-11-01 15:37:22 -04:00 committed by Miklos Szeredi
parent ad204488d3
commit 5455f92b54
1 changed files with 1 additions and 1 deletions

View File

@ -641,7 +641,7 @@ struct dentry *ovl_lookup(struct inode *dir, struct dentry *dentry,
err = ovl_check_origin(upperdentry, roe->lowerstack,
roe->numlower, &stack, &ctr);
if (err)
goto out;
goto out_put_upper;
}
if (d.redirect) {