ovl: Put upperdentry if ovl_check_origin() fails
Subsystems (2)
PATCH 1/1 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.
--- fs/overlayfs/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/overlayfs/namei.c +1 -1
@@ -630,7 +630,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) {
Signature · 1 line
2.13.6
Quoted 6 lines · Vivek Goyal
If
ovl_check_origin()fails, we should put upperdentry. We have a reference on it by now. So gotoout_put_upperinstead of out.Fixes a9d019573e88 ("ovl: lookup non-dir copy-up-origin by file handle")Cc <[email protected]> #4.12Signed-off-by Vivek Goyal <[email protected]>
Hi Amir, Miklos,
Does this patch look fine? I think its a simple bug fix and should go in 4.15.
Vivek
Quoted 24 lines
--- fs/overlayfs/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/overlayfs/namei.c +1
-1@@ -630,7 +630,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) {Signature · 6 lines
2.13.6 -- To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Amir Goldstein
maintainerQuoted 4 lines · Vivek Goyal
Quoted 3 lines · Vivek Goyal
If
ovl_check_origin()fails, we should put upperdentry. We have a reference on it by now. So gotoout_put_upperinstead of out.
Quoted 9 lines
Quoted 3 lines
Fixes a9d019573e88 ("ovl: lookup non-dir copy-up-origin by file handle")Cc <[email protected]> #4.12Signed-off-by Vivek Goyal <[email protected]>Hi Amir, Miklos,
Does this patch look fine? I think its a simple bug fix and should go in 4.15.
Agreed.
Amir.
Quoted 9 lines · Amir Goldstein
Quoted 8 lines · Vivek Goyal
Quoted 6 lines · Vivek Goyal
If
ovl_check_origin()fails, we should put upperdentry. We have a reference on it by now. So gotoout_put_upperinstead of out.Fixes a9d019573e88 ("ovl: lookup non-dir copy-up-origin by file handle")Cc <[email protected]> #4.12Signed-off-by Vivek Goyal <[email protected]>
Quoted 5 lines
Quoted 5 lines
Hi Amir, Miklos,
Does this patch look fine? I think its a simple bug fix and should go in 4.15.
Thanks, applied.
Miklos