Commit 01a261e0 authored by Ryusuke Konishi's avatar Ryusuke Konishi

nilfs2: fix missing unlock in error path of nilfs_mdt_write_page

This adds a missing unlock of nilfs->ns_writer_mutex in
nilfs_mdt_write_page() function.
Signed-off-by: default avatarRyusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
parent a9777845
...@@ -412,8 +412,10 @@ nilfs_mdt_write_page(struct page *page, struct writeback_control *wbc) ...@@ -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 */ return 0; /* Do not request flush for shadow page cache */
if (!sb) { if (!sb) {
writer = nilfs_get_writer(NILFS_MDT(inode)->mi_nilfs); writer = nilfs_get_writer(NILFS_MDT(inode)->mi_nilfs);
if (!writer) if (!writer) {
nilfs_put_writer(NILFS_MDT(inode)->mi_nilfs);
return -EROFS; return -EROFS;
}
sb = writer->s_super; sb = writer->s_super;
} }
......
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