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) {