Commit 1fe06ad8 authored by Jens Axboe's avatar Jens Axboe

writeback: get rid of wbc->for_writepages

It's only set, it's never checked. Kill it.
Acked-by: default avatarJan Kara <jack@suse.cz>
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent 2c96ce9f
...@@ -712,7 +712,6 @@ int afs_writeback_all(struct afs_vnode *vnode) ...@@ -712,7 +712,6 @@ int afs_writeback_all(struct afs_vnode *vnode)
.bdi = mapping->backing_dev_info, .bdi = mapping->backing_dev_info,
.sync_mode = WB_SYNC_ALL, .sync_mode = WB_SYNC_ALL,
.nr_to_write = LONG_MAX, .nr_to_write = LONG_MAX,
.for_writepages = 1,
.range_cyclic = 1, .range_cyclic = 1,
}; };
int ret; int ret;
......
...@@ -740,7 +740,6 @@ int btrfs_fdatawrite_range(struct address_space *mapping, loff_t start, ...@@ -740,7 +740,6 @@ int btrfs_fdatawrite_range(struct address_space *mapping, loff_t start,
.nr_to_write = mapping->nrpages * 2, .nr_to_write = mapping->nrpages * 2,
.range_start = start, .range_start = start,
.range_end = end, .range_end = end,
.for_writepages = 1,
}; };
return btrfs_writepages(mapping, &wbc); return btrfs_writepages(mapping, &wbc);
} }
......
...@@ -220,7 +220,6 @@ static int journal_submit_inode_data_buffers(struct address_space *mapping) ...@@ -220,7 +220,6 @@ static int journal_submit_inode_data_buffers(struct address_space *mapping)
.nr_to_write = mapping->nrpages * 2, .nr_to_write = mapping->nrpages * 2,
.range_start = 0, .range_start = 0,
.range_end = i_size_read(mapping->host), .range_end = i_size_read(mapping->host),
.for_writepages = 1,
}; };
ret = generic_writepages(mapping, &wbc); ret = generic_writepages(mapping, &wbc);
......
...@@ -1490,7 +1490,6 @@ static int nfs_write_mapping(struct address_space *mapping, int how) ...@@ -1490,7 +1490,6 @@ static int nfs_write_mapping(struct address_space *mapping, int how)
.nr_to_write = LONG_MAX, .nr_to_write = LONG_MAX,
.range_start = 0, .range_start = 0,
.range_end = LLONG_MAX, .range_end = LLONG_MAX,
.for_writepages = 1,
}; };
return __nfs_write_mapping(mapping, &wbc, how); return __nfs_write_mapping(mapping, &wbc, how);
......
...@@ -50,7 +50,6 @@ struct writeback_control { ...@@ -50,7 +50,6 @@ struct writeback_control {
unsigned encountered_congestion:1; /* An output: a queue is full */ unsigned encountered_congestion:1; /* An output: a queue is full */
unsigned for_kupdate:1; /* A kupdate writeback */ unsigned for_kupdate:1; /* A kupdate writeback */
unsigned for_reclaim:1; /* Invoked from the page allocator */ unsigned for_reclaim:1; /* Invoked from the page allocator */
unsigned for_writepages:1; /* This is a writepages() call */
unsigned range_cyclic:1; /* range_start is cyclic */ unsigned range_cyclic:1; /* range_start is cyclic */
unsigned more_io:1; /* more io to be dispatched */ unsigned more_io:1; /* more io to be dispatched */
/* /*
......
...@@ -227,7 +227,6 @@ TRACE_EVENT(ext4_da_writepages, ...@@ -227,7 +227,6 @@ TRACE_EVENT(ext4_da_writepages,
__field( char, nonblocking ) __field( char, nonblocking )
__field( char, for_kupdate ) __field( char, for_kupdate )
__field( char, for_reclaim ) __field( char, for_reclaim )
__field( char, for_writepages )
__field( char, range_cyclic ) __field( char, range_cyclic )
), ),
...@@ -241,16 +240,15 @@ TRACE_EVENT(ext4_da_writepages, ...@@ -241,16 +240,15 @@ TRACE_EVENT(ext4_da_writepages,
__entry->nonblocking = wbc->nonblocking; __entry->nonblocking = wbc->nonblocking;
__entry->for_kupdate = wbc->for_kupdate; __entry->for_kupdate = wbc->for_kupdate;
__entry->for_reclaim = wbc->for_reclaim; __entry->for_reclaim = wbc->for_reclaim;
__entry->for_writepages = wbc->for_writepages;
__entry->range_cyclic = wbc->range_cyclic; __entry->range_cyclic = wbc->range_cyclic;
), ),
TP_printk("dev %s ino %lu nr_t_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d for_writepages %d range_cyclic %d", TP_printk("dev %s ino %lu nr_t_write %ld pages_skipped %ld range_start %llu range_end %llu nonblocking %d for_kupdate %d for_reclaim %d range_cyclic %d",
jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->nr_to_write, jbd2_dev_to_name(__entry->dev), __entry->ino, __entry->nr_to_write,
__entry->pages_skipped, __entry->range_start, __entry->pages_skipped, __entry->range_start,
__entry->range_end, __entry->nonblocking, __entry->range_end, __entry->nonblocking,
__entry->for_kupdate, __entry->for_reclaim, __entry->for_kupdate, __entry->for_reclaim,
__entry->for_writepages, __entry->range_cyclic) __entry->range_cyclic)
); );
TRACE_EVENT(ext4_da_writepages_result, TRACE_EVENT(ext4_da_writepages_result,
......
...@@ -1020,12 +1020,10 @@ int do_writepages(struct address_space *mapping, struct writeback_control *wbc) ...@@ -1020,12 +1020,10 @@ int do_writepages(struct address_space *mapping, struct writeback_control *wbc)
if (wbc->nr_to_write <= 0) if (wbc->nr_to_write <= 0)
return 0; return 0;
wbc->for_writepages = 1;
if (mapping->a_ops->writepages) if (mapping->a_ops->writepages)
ret = mapping->a_ops->writepages(mapping, wbc); ret = mapping->a_ops->writepages(mapping, wbc);
else else
ret = generic_writepages(mapping, wbc); ret = generic_writepages(mapping, wbc);
wbc->for_writepages = 0;
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment