mirror of
https://github.com/FEX-Emu/linux.git
synced 2025-02-22 05:16:38 +00:00
ubifs: Fix double unlock around orphan_delete()
We unlock after orphan_delete(), so no need to unlock in the function too. Reported-by: Han Xu <han.xu@nxp.com> Fixes: 8009ce956c3d ("ubifs: Don't leak orphans on memory during commit") Signed-off-by: Richard Weinberger <richard@nod.at>
This commit is contained in:
parent
7542c6dedb
commit
4dd75b335b
@ -129,7 +129,6 @@ static void __orphan_drop(struct ubifs_info *c, struct ubifs_orphan *o)
|
||||
static void orphan_delete(struct ubifs_info *c, struct ubifs_orphan *orph)
|
||||
{
|
||||
if (orph->del) {
|
||||
spin_unlock(&c->orphan_lock);
|
||||
dbg_gen("deleted twice ino %lu", orph->inum);
|
||||
return;
|
||||
}
|
||||
@ -138,7 +137,6 @@ static void orphan_delete(struct ubifs_info *c, struct ubifs_orphan *orph)
|
||||
orph->del = 1;
|
||||
orph->dnext = c->orph_dnext;
|
||||
c->orph_dnext = orph;
|
||||
spin_unlock(&c->orphan_lock);
|
||||
dbg_gen("delete later ino %lu", orph->inum);
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user