Commit 9f4ec904 authored by Amir Goldstein's avatar Amir Goldstein Committed by Miklos Szeredi

ovl: fix dput() of ERR_PTR in ovl_cleanup_index()

Fixes: caf70cb2 ("ovl: cleanup orphan index entries")
Cc: <stable@vger.kernel.org> # v4.13
Signed-off-by: default avatarAmir Goldstein <amir73il@gmail.com>
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent e0082a0f
......@@ -430,7 +430,7 @@ void ovl_inuse_unlock(struct dentry *dentry)
}
}
/* Called must hold OVL_I(inode)->oi_lock */
/* Caller must hold OVL_I(inode)->lock */
static void ovl_cleanup_index(struct dentry *dentry)
{
struct inode *dir = ovl_indexdir(dentry->d_sb)->d_inode;
......@@ -469,6 +469,9 @@ static void ovl_cleanup_index(struct dentry *dentry)
err = PTR_ERR(index);
if (!IS_ERR(index))
err = ovl_cleanup(dir, index);
else
index = NULL;
inode_unlock(dir);
if (err)
goto fail;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment