diff options
-rw-r--r-- | fs/nilfs2/mdt.c | 2 | ||||
-rw-r--r-- | fs/nilfs2/page.c | 3 |
2 files changed, 3 insertions, 2 deletions
diff --git a/fs/nilfs2/mdt.c b/fs/nilfs2/mdt.c index e1c6777931b7..bb78745a0e30 100644 --- a/fs/nilfs2/mdt.c +++ b/fs/nilfs2/mdt.c | |||
@@ -300,7 +300,7 @@ int nilfs_mdt_delete_block(struct inode *inode, unsigned long block) | |||
300 | int err; | 300 | int err; |
301 | 301 | ||
302 | err = nilfs_bmap_delete(ii->i_bmap, block); | 302 | err = nilfs_bmap_delete(ii->i_bmap, block); |
303 | if (likely(!err)) { | 303 | if (!err || err == -ENOENT) { |
304 | nilfs_mdt_mark_dirty(inode); | 304 | nilfs_mdt_mark_dirty(inode); |
305 | nilfs_mdt_forget_block(inode, block); | 305 | nilfs_mdt_forget_block(inode, block); |
306 | } | 306 | } |
diff --git a/fs/nilfs2/page.c b/fs/nilfs2/page.c index 1bfbba9c0e9a..a2692bbc7b50 100644 --- a/fs/nilfs2/page.c +++ b/fs/nilfs2/page.c | |||
@@ -128,7 +128,8 @@ void nilfs_forget_buffer(struct buffer_head *bh) | |||
128 | 128 | ||
129 | lock_buffer(bh); | 129 | lock_buffer(bh); |
130 | clear_buffer_nilfs_volatile(bh); | 130 | clear_buffer_nilfs_volatile(bh); |
131 | if (test_clear_buffer_dirty(bh) && nilfs_page_buffers_clean(page)) | 131 | clear_buffer_dirty(bh); |
132 | if (nilfs_page_buffers_clean(page)) | ||
132 | __nilfs_clear_page_dirty(page); | 133 | __nilfs_clear_page_dirty(page); |
133 | 134 | ||
134 | clear_buffer_uptodate(bh); | 135 | clear_buffer_uptodate(bh); |