diff options
author | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-08-02 10:45:55 +0200 |
---|---|---|
committer | Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp> | 2009-08-02 15:24:15 +0200 |
commit | 01a261e09a21e0ba342d3907a79cf5c78ee3f37a (patch) | |
tree | e26e8008ce2de35afe2703529d771268a256329f | |
parent | nilfs2: fix oops due to inconsistent state in page with discrete b-tree nodes (diff) | |
download | linux-01a261e09a21e0ba342d3907a79cf5c78ee3f37a.tar.xz linux-01a261e09a21e0ba342d3907a79cf5c78ee3f37a.zip |
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>
-rw-r--r-- | fs/nilfs2/mdt.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/nilfs2/mdt.c b/fs/nilfs2/mdt.c index 3d3ddb3f5177..2dfd47714ae5 100644 --- a/fs/nilfs2/mdt.c +++ b/fs/nilfs2/mdt.c @@ -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; } |