Commit 49d2e05f authored by Richard Weinberger's avatar Richard Weinberger

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: default avatarRichard Weinberger <richard@nod.at>
parent 7e5471ce
...@@ -317,6 +317,7 @@ static int make_reservation(struct ubifs_info *c, int jhead, int len) ...@@ -317,6 +317,7 @@ static int make_reservation(struct ubifs_info *c, int jhead, int len)
down_read(&c->commit_sem); down_read(&c->commit_sem);
err = reserve_space(c, jhead, len); err = reserve_space(c, jhead, len);
if (!err) if (!err)
/* c->commit_sem will get released via finish_reservation(). */
return 0; return 0;
up_read(&c->commit_sem); up_read(&c->commit_sem);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment