提交 49d2e05f 编写于 作者: R 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: NRichard Weinberger <richard@nod.at>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册