summaryrefslogtreecommitdiffstats
path: root/fs/ubifs/orphan.c
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2019-08-13 23:50:51 +0200
committerRichard Weinberger <richard@nod.at>2019-08-22 17:24:58 +0200
commit4dd75b335bc1f10fb1a01b5cd58870d47c13c4e7 (patch)
tree6f7eeb423163445b1b886460f895d9632e1330d7 /fs/ubifs/orphan.c
parent7542c6dedbc1caa284ca4cbd6b64f99023ff1b97 (diff)
downloadlinux-4dd75b335bc1f10fb1a01b5cd58870d47c13c4e7.tar.bz2
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>
Diffstat (limited to 'fs/ubifs/orphan.c')
-rw-r--r--fs/ubifs/orphan.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/fs/ubifs/orphan.c b/fs/ubifs/orphan.c
index b52624e28fa1..3b4b4114f208 100644
--- a/fs/ubifs/orphan.c
+++ b/fs/ubifs/orphan.c
@@ -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;
}