Skip to content

Commit

Permalink
ubifs: Fix double unlock around orphan_delete()
Browse files Browse the repository at this point in the history
We unlock after orphan_delete(), so no need to unlock
in the function too.

Reported-by: Han Xu <[email protected]>
Fixes: 8009ce9 ("ubifs: Don't leak orphans on memory during commit")
Signed-off-by: Richard Weinberger <[email protected]>
  • Loading branch information
richardweinberger committed Aug 22, 2019
1 parent 7542c6d commit 4dd75b3
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions fs/ubifs/orphan.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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;
}
Expand Down

0 comments on commit 4dd75b3

Please sign in to comment.