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: Sven Schnelle <svens@stackframe.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Sven Schnelle 2008-04-02 13:17:18 +01:00 committed by Linus Torvalds
parent 0e81a8ae37
commit a5f37c3252

View File

@ -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;
}