summaryrefslogtreecommitdiff
path: root/fs/ubifs
diff options
context:
space:
mode:
authorRichard Weinberger <richard@nod.at>2018-08-13 16:14:45 +0300
committerRichard Weinberger <richard@nod.at>2018-08-15 01:25:20 +0300
commit49d2e05fb474718804cd3d1ec1e07213ecffc040 (patch)
treefc3d47cfd76a06021054c4c50ce14cf4b82eab5f /fs/ubifs
parent7e5471ce6dba5f28a3c7afdfe168655d236f677b (diff)
downloadlinux-49d2e05fb474718804cd3d1ec1e07213ecffc040.tar.xz
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@nod.at>
Diffstat (limited to 'fs/ubifs')
-rw-r--r--fs/ubifs/journal.c1
1 files changed, 1 insertions, 0 deletions
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);