summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorMike Christie <mchristi@redhat.com>2016-08-04 20:23:34 (GMT)
committerJens Axboe <axboe@fb.com>2016-08-04 20:25:33 (GMT)
commitabf545484d31b68777a85c5c8f5b4bcde08283eb (patch)
treeee91e0a9e679e13cff54ede6b6b489627d72c1b1 /mm
parentc1c87c2ba9ec06d8ba9e8a26c18c67a2ba9cd9c1 (diff)
downloadlinux-abf545484d31b68777a85c5c8f5b4bcde08283eb.tar.xz
mm/block: convert rw_page users to bio op use
The rw_page users were not converted to use bio/req ops. As a result bdev_write_page is not passing down REQ_OP_WRITE and the IOs will be sent down as reads. Signed-off-by: Mike Christie <mchristi@redhat.com> Fixes: 4e1b2d52a80d ("block, fs, drivers: remove REQ_OP compat defs and related code") Modified by me to: 1) Drop op_flags passing into ->rw_page(), as we don't use it. 2) Make op_is_write() and friends safe to use for !CONFIG_BLOCK Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'mm')
-rw-r--r--mm/filemap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/filemap.c b/mm/filemap.c
index 3083ded..daef091 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -887,9 +887,9 @@ EXPORT_SYMBOL(end_page_writeback);
* After completing I/O on a page, call this routine to update the page
* flags appropriately
*/
-void page_endio(struct page *page, int rw, int err)
+void page_endio(struct page *page, int op, int err)
{
- if (rw == READ) {
+ if (!op_is_write(op)) {
if (!err) {
SetPageUptodate(page);
} else {
@@ -897,7 +897,7 @@ void page_endio(struct page *page, int rw, int err)
SetPageError(page);
}
unlock_page(page);
- } else { /* rw == WRITE */
+ } else {
if (err) {
SetPageError(page);
if (page->mapping)