Skip to content

Commit

Permalink
nilfs2: fix missing unlock in error path of nilfs_mdt_write_page
Browse files Browse the repository at this point in the history
This adds a missing unlock of nilfs->ns_writer_mutex in
nilfs_mdt_write_page() function.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
  • Loading branch information
Ryusuke Konishi committed Aug 2, 2009
1 parent a977784 commit 01a261e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/nilfs2/mdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -412,8 +412,10 @@ nilfs_mdt_write_page(struct page *page, struct writeback_control *wbc)
return 0; /* Do not request flush for shadow page cache */
if (!sb) {
writer = nilfs_get_writer(NILFS_MDT(inode)->mi_nilfs);
if (!writer)
if (!writer) {
nilfs_put_writer(NILFS_MDT(inode)->mi_nilfs);
return -EROFS;
}
sb = writer->s_super;
}

Expand Down

0 comments on commit 01a261e

Please sign in to comment.