提交 a5f37c32 编写于 作者: S Sven Schnelle 提交者: Linus Torvalds

afs: add missing up_write() on return

If afs_cell_alloc() fails, afs_cells_sem doesn't get unlocked, which
leads to a deadlock.  Unlock it before returning.
Signed-off-by: NSven Schnelle <svens@stackframe.org>
Signed-off-by: NDavid Howells <dhowells@redhat.com>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 0e81a8ae
......@@ -138,6 +138,7 @@ struct afs_cell *afs_cell_create(const char *name, char *vllist)
cell = afs_cell_alloc(name, vllist);
if (IS_ERR(cell)) {
_leave(" = %ld", PTR_ERR(cell));
up_write(&afs_cells_sem);
return cell;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册