aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nilfs2/segment.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nilfs2/segment.c')
-rw-r--r--fs/nilfs2/segment.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index 0c3f303baf32..c6abbad9b8e3 100644
--- a/fs/nilfs2/segment.c
+++ b/fs/nilfs2/segment.c
@@ -24,6 +24,7 @@
24#include <linux/pagemap.h> 24#include <linux/pagemap.h>
25#include <linux/buffer_head.h> 25#include <linux/buffer_head.h>
26#include <linux/writeback.h> 26#include <linux/writeback.h>
27#include <linux/bitops.h>
27#include <linux/bio.h> 28#include <linux/bio.h>
28#include <linux/completion.h> 29#include <linux/completion.h>
29#include <linux/blkdev.h> 30#include <linux/blkdev.h>
@@ -1588,7 +1589,6 @@ static void nilfs_segctor_prepare_write(struct nilfs_sc_info *sci)
1588 1589
1589 list_for_each_entry(bh, &segbuf->sb_segsum_buffers, 1590 list_for_each_entry(bh, &segbuf->sb_segsum_buffers,
1590 b_assoc_buffers) { 1591 b_assoc_buffers) {
1591 set_buffer_async_write(bh);
1592 if (bh->b_page != bd_page) { 1592 if (bh->b_page != bd_page) {
1593 if (bd_page) { 1593 if (bd_page) {
1594 lock_page(bd_page); 1594 lock_page(bd_page);
@@ -1688,7 +1688,6 @@ static void nilfs_abort_logs(struct list_head *logs, int err)
1688 list_for_each_entry(segbuf, logs, sb_list) { 1688 list_for_each_entry(segbuf, logs, sb_list) {
1689 list_for_each_entry(bh, &segbuf->sb_segsum_buffers, 1689 list_for_each_entry(bh, &segbuf->sb_segsum_buffers,
1690 b_assoc_buffers) { 1690 b_assoc_buffers) {
1691 clear_buffer_async_write(bh);
1692 if (bh->b_page != bd_page) { 1691 if (bh->b_page != bd_page) {
1693 if (bd_page) 1692 if (bd_page)
1694 end_page_writeback(bd_page); 1693 end_page_writeback(bd_page);
@@ -1768,7 +1767,6 @@ static void nilfs_segctor_complete_write(struct nilfs_sc_info *sci)
1768 b_assoc_buffers) { 1767 b_assoc_buffers) {
1769 set_buffer_uptodate(bh); 1768 set_buffer_uptodate(bh);
1770 clear_buffer_dirty(bh); 1769 clear_buffer_dirty(bh);
1771 clear_buffer_async_write(bh);
1772 if (bh->b_page != bd_page) { 1770 if (bh->b_page != bd_page) {
1773 if (bd_page) 1771 if (bd_page)
1774 end_page_writeback(bd_page); 1772 end_page_writeback(bd_page);
@@ -1788,12 +1786,13 @@ static void nilfs_segctor_complete_write(struct nilfs_sc_info *sci)
1788 */ 1786 */
1789 list_for_each_entry(bh, &segbuf->sb_payload_buffers, 1787 list_for_each_entry(bh, &segbuf->sb_payload_buffers,
1790 b_assoc_buffers) { 1788 b_assoc_buffers) {
1791 set_buffer_uptodate(bh); 1789 const unsigned long set_bits = (1 << BH_Uptodate);
1792 clear_buffer_dirty(bh); 1790 const unsigned long clear_bits =
1793 clear_buffer_async_write(bh); 1791 (1 << BH_Dirty | 1 << BH_Async_Write |
1794 clear_buffer_delay(bh); 1792 1 << BH_Delay | 1 << BH_NILFS_Volatile |
1795 clear_buffer_nilfs_volatile(bh); 1793 1 << BH_NILFS_Redirected);
1796 clear_buffer_nilfs_redirected(bh); 1794
1795 set_mask_bits(&bh->b_state, clear_bits, set_bits);
1797 if (bh == segbuf->sb_super_root) { 1796 if (bh == segbuf->sb_super_root) {
1798 if (bh->b_page != bd_page) { 1797 if (bh->b_page != bd_page) {
1799 end_page_writeback(bd_page); 1798 end_page_writeback(bd_page);