ubifs: Add comment on c->commit_sem
authorRichard Weinberger <richard@nod.at>
Mon, 13 Aug 2018 13:14:45 +0000 (15:14 +0200)
committerRichard Weinberger <richard@nod.at>
Tue, 14 Aug 2018 22:25:20 +0000 (00:25 +0200)
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@nod.at>
fs/ubifs/journal.c

index c830418..c5d9c61 100644 (file)
@@ -317,6 +317,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);