Messages in this thread Patch in this message | | | From | Richard Weinberger <> | Subject | [PATCH] ubifs: Add comment on c->commit_sem | Date | Mon, 13 Aug 2018 15:14:45 +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 | 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
| |