lkml.org 
[lkml]   [2018]   [Aug]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] ubifs: Add comment on c->commit_sem
Date
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
\
 
 \ /
  Last update: 2018-08-13 15:15    [W:0.028 / U:0.524 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site