Skip to content
Commit 52d5a0c6 authored by chenying's avatar chenying Committed by Miklos Szeredi
Browse files

ovl: fix BUG_ON() in may_delete() when called from ovl_cleanup()



If function ovl_instantiate() returns an error, ovl_cleanup will be called
and try to remove newdentry from wdir, but the newdentry has been moved to
udir at this time.  This will causes BUG_ON(victim->d_parent->d_inode !=
dir) in fs/namei.c:may_delete.

Signed-off-by: default avatarchenying <chenying.kernel@bytedance.com>
Fixes: 01b39dcc

 ("ovl: use inode_insert5() to hash a newly created inode")
Link: https://lore.kernel.org/linux-unionfs/e6496a94-a161-dc04-c38a-d2544633acb4@bytedance.com/
Cc: <stable@vger.kernel.org> # v4.18
Signed-off-by: default avatarMiklos Szeredi <mszeredi@redhat.com>
parent f945ca19
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