From 49d2e05fb474718804cd3d1ec1e07213ecffc040 Mon Sep 17 00:00:00 2001 From: Richard Weinberger Date: Mon, 13 Aug 2018 15:14:45 +0200 Subject: 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 --- fs/ubifs/journal.c | 1 + 1 file changed, 1 insertion(+) (limited to 'fs') diff --git a/fs/ubifs/journal.c b/fs/ubifs/journal.c index c83041891cef..c5d9c6136057 100644 --- a/fs/ubifs/journal.c +++ b/fs/ubifs/journal.c @@ -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); -- cgit v1.2.1