[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20180813131445.5656-1-richard@nod.at>
Date: Mon, 13 Aug 2018 15:14:45 +0200
From: Richard Weinberger <richard@....at>
To: linux-mtd@...ts.infradead.org
Cc: linux-kernel@...r.kernel.org, Richard Weinberger <richard@....at>
Subject: [PATCH] ubifs: Add comment on c->commit_sem
Every single time I come across that code, I get confused
because it looks like a possible dead lock.
Help myself by adding a comment.
Signed-off-by: Richard Weinberger <richard@....at>
---
fs/ubifs/journal.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c
index 95665eba2b70..c913f36d6c21 100644
--- a/fs/ubifs/journal.c
+++ b/fs/ubifs/journal.c
@@ -328,6 +328,7 @@ again:
down_read(&c->commit_sem);
err = reserve_space(c, jhead, len);
if (!err)
+ /* c->commit_sem will get released via finish_reservation(). */
return 0;
up_read(&c->commit_sem);
--
2.18.0
Powered by blists - more mailing lists