diff options
Diffstat (limited to 'fs/fs-writeback.c')
-rw-r--r-- | fs/fs-writeback.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index f3fbe2d030f4..031b27a4bc9a 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c | |||
@@ -461,6 +461,8 @@ void sync_inodes_sb(struct super_block *sb, int wait) | |||
461 | { | 461 | { |
462 | struct writeback_control wbc = { | 462 | struct writeback_control wbc = { |
463 | .sync_mode = wait ? WB_SYNC_ALL : WB_SYNC_HOLD, | 463 | .sync_mode = wait ? WB_SYNC_ALL : WB_SYNC_HOLD, |
464 | .range_start = 0, | ||
465 | .range_end = LLONG_MAX, | ||
464 | }; | 466 | }; |
465 | unsigned long nr_dirty = read_page_state(nr_dirty); | 467 | unsigned long nr_dirty = read_page_state(nr_dirty); |
466 | unsigned long nr_unstable = read_page_state(nr_unstable); | 468 | unsigned long nr_unstable = read_page_state(nr_unstable); |
@@ -559,6 +561,8 @@ int write_inode_now(struct inode *inode, int sync) | |||
559 | struct writeback_control wbc = { | 561 | struct writeback_control wbc = { |
560 | .nr_to_write = LONG_MAX, | 562 | .nr_to_write = LONG_MAX, |
561 | .sync_mode = WB_SYNC_ALL, | 563 | .sync_mode = WB_SYNC_ALL, |
564 | .range_start = 0, | ||
565 | .range_end = LLONG_MAX, | ||
562 | }; | 566 | }; |
563 | 567 | ||
564 | if (!mapping_cap_writeback_dirty(inode->i_mapping)) | 568 | if (!mapping_cap_writeback_dirty(inode->i_mapping)) |
@@ -619,7 +623,6 @@ int generic_osync_inode(struct inode *inode, struct address_space *mapping, int | |||
619 | int need_write_inode_now = 0; | 623 | int need_write_inode_now = 0; |
620 | int err2; | 624 | int err2; |
621 | 625 | ||
622 | current->flags |= PF_SYNCWRITE; | ||
623 | if (what & OSYNC_DATA) | 626 | if (what & OSYNC_DATA) |
624 | err = filemap_fdatawrite(mapping); | 627 | err = filemap_fdatawrite(mapping); |
625 | if (what & (OSYNC_METADATA|OSYNC_DATA)) { | 628 | if (what & (OSYNC_METADATA|OSYNC_DATA)) { |
@@ -632,7 +635,6 @@ int generic_osync_inode(struct inode *inode, struct address_space *mapping, int | |||
632 | if (!err) | 635 | if (!err) |
633 | err = err2; | 636 | err = err2; |
634 | } | 637 | } |
635 | current->flags &= ~PF_SYNCWRITE; | ||
636 | 638 | ||
637 | spin_lock(&inode_lock); | 639 | spin_lock(&inode_lock); |
638 | if ((inode->i_state & I_DIRTY) && | 640 | if ((inode->i_state & I_DIRTY) && |