diff options
author | Vivek Goyal <vgoyal@redhat.com> | 2017-11-01 15:37:22 -0400 |
---|---|---|
committer | Miklos Szeredi <mszeredi@redhat.com> | 2017-11-10 09:39:16 +0100 |
commit | 5455f92b54e516995a9ca45bbf790d3629c27a93 (patch) | |
tree | 3d85716686d62932342583810535e01637ba5f71 | |
parent | ad204488d3046b3baee2d2b1b05323d956a7c45b (diff) | |
download | linux-stable-5455f92b54e516995a9ca45bbf790d3629c27a93.tar.gz linux-stable-5455f92b54e516995a9ca45bbf790d3629c27a93.tar.bz2 linux-stable-5455f92b54e516995a9ca45bbf790d3629c27a93.zip |
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: a9d019573e88 ("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>
-rw-r--r-- | fs/overlayfs/namei.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/overlayfs/namei.c b/fs/overlayfs/namei.c index 6cc3ece3417d..7d4099143a57 100644 --- a/fs/overlayfs/namei.c +++ b/fs/overlayfs/namei.c @@ -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) { |