Commit 01a261e09a21e0ba342d3907a79cf5c78ee3f37a
1 parent
a97778457f
Exists in
master
and in
7 other branches
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: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
Showing 1 changed file with 3 additions and 1 deletions Side-by-side Diff
fs/nilfs2/mdt.c
... | ... | @@ -412,8 +412,10 @@ |
412 | 412 | return 0; /* Do not request flush for shadow page cache */ |
413 | 413 | if (!sb) { |
414 | 414 | writer = nilfs_get_writer(NILFS_MDT(inode)->mi_nilfs); |
415 | - if (!writer) | |
415 | + if (!writer) { | |
416 | + nilfs_put_writer(NILFS_MDT(inode)->mi_nilfs); | |
416 | 417 | return -EROFS; |
418 | + } | |
417 | 419 | sb = writer->s_super; |
418 | 420 | } |
419 | 421 |