mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 16:11:45 +00:00
block,fs: use REQ_* flags directly
Remove the WRITE_* and READ_SYNC wrappers, and just use the flags directly. Where applicable this also drops usage of the bio_set_op_attrs wrapper. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <axboe@fb.com>
This commit is contained in:
parent
a2b809672e
commit
70fd76140a
53 changed files with 133 additions and 182 deletions
|
@ -753,7 +753,7 @@ static int fsync_buffers_list(spinlock_t *lock, struct list_head *list)
|
|||
* still in flight on potentially older
|
||||
* contents.
|
||||
*/
|
||||
write_dirty_buffer(bh, WRITE_SYNC);
|
||||
write_dirty_buffer(bh, REQ_SYNC);
|
||||
|
||||
/*
|
||||
* Kick off IO for the previous mapping. Note
|
||||
|
@ -1684,7 +1684,7 @@ static struct buffer_head *create_page_buffers(struct page *page, struct inode *
|
|||
* prevents this contention from occurring.
|
||||
*
|
||||
* If block_write_full_page() is called with wbc->sync_mode ==
|
||||
* WB_SYNC_ALL, the writes are posted using WRITE_SYNC; this
|
||||
* WB_SYNC_ALL, the writes are posted using REQ_SYNC; this
|
||||
* causes the writes to be flagged as synchronous writes.
|
||||
*/
|
||||
int __block_write_full_page(struct inode *inode, struct page *page,
|
||||
|
@ -1697,7 +1697,7 @@ int __block_write_full_page(struct inode *inode, struct page *page,
|
|||
struct buffer_head *bh, *head;
|
||||
unsigned int blocksize, bbits;
|
||||
int nr_underway = 0;
|
||||
int write_flags = (wbc->sync_mode == WB_SYNC_ALL ? WRITE_SYNC : 0);
|
||||
int write_flags = (wbc->sync_mode == WB_SYNC_ALL ? REQ_SYNC : 0);
|
||||
|
||||
head = create_page_buffers(page, inode,
|
||||
(1 << BH_Dirty)|(1 << BH_Uptodate));
|
||||
|
@ -3210,7 +3210,7 @@ EXPORT_SYMBOL(__sync_dirty_buffer);
|
|||
|
||||
int sync_dirty_buffer(struct buffer_head *bh)
|
||||
{
|
||||
return __sync_dirty_buffer(bh, WRITE_SYNC);
|
||||
return __sync_dirty_buffer(bh, REQ_SYNC);
|
||||
}
|
||||
EXPORT_SYMBOL(sync_dirty_buffer);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue