Commit 4dd75b33 authored by Richard Weinberger's avatar Richard Weinberger

ubifs: Fix double unlock around orphan_delete()

We unlock after orphan_delete(), so no need to unlock
in the function too.
Reported-by: default avatarHan Xu <han.xu@nxp.com>
Fixes: 8009ce95 ("ubifs: Don't leak orphans on memory during commit")
Signed-off-by: default avatarRichard Weinberger <richard@nod.at>
parent 7542c6de
...@@ -129,7 +129,6 @@ static void __orphan_drop(struct ubifs_info *c, struct ubifs_orphan *o) ...@@ -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) static void orphan_delete(struct ubifs_info *c, struct ubifs_orphan *orph)
{ {
if (orph->del) { if (orph->del) {
spin_unlock(&c->orphan_lock);
dbg_gen("deleted twice ino %lu", orph->inum); dbg_gen("deleted twice ino %lu", orph->inum);
return; return;
} }
...@@ -138,7 +137,6 @@ static void orphan_delete(struct ubifs_info *c, struct ubifs_orphan *orph) ...@@ -138,7 +137,6 @@ static void orphan_delete(struct ubifs_info *c, struct ubifs_orphan *orph)
orph->del = 1; orph->del = 1;
orph->dnext = c->orph_dnext; orph->dnext = c->orph_dnext;
c->orph_dnext = orph; c->orph_dnext = orph;
spin_unlock(&c->orphan_lock);
dbg_gen("delete later ino %lu", orph->inum); dbg_gen("delete later ino %lu", orph->inum);
return; return;
} }
......
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