提交 3fe968f1 编写于 作者: A Andrew Morton 提交者: Linus Torvalds

[PATCH] blkmtd: use clear_page_dirty()

SetPageDirty() and ClearPageDirty() are low-level thing which filesystems
shouldn't be using.  They bypass dirty page accounting.

Cc: David Woodhouse <dwmw2@infradead.org>
Acked-by: NThomas Gleixner <tglx@linutronix.de>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 67121172
......@@ -113,7 +113,7 @@ static int bi_write_complete(struct bio *bio, unsigned int bytes_done, int error
ClearPageUptodate(page);
SetPageError(page);
}
ClearPageDirty(page);
clear_page_dirty(page);
unlock_page(page);
page_cache_release(page);
} while (bvec >= bio->bi_io_vec);
......@@ -289,7 +289,7 @@ static int write_pages(struct blkmtd_dev *dev, const u_char *buf, loff_t to,
BUG();
}
memcpy(page_address(page)+offset, buf, start_len);
SetPageDirty(page);
set_page_dirty(page);
SetPageUptodate(page);
buf += start_len;
thislen = start_len;
......@@ -336,7 +336,7 @@ static int write_pages(struct blkmtd_dev *dev, const u_char *buf, loff_t to,
}
pagenr++;
pagecnt--;
SetPageDirty(page);
set_page_dirty(page);
SetPageUptodate(page);
pagesc--;
thislen += PAGE_SIZE;
......@@ -357,7 +357,7 @@ static int write_pages(struct blkmtd_dev *dev, const u_char *buf, loff_t to,
BUG();
}
memcpy(page_address(page), buf, end_len);
SetPageDirty(page);
set_page_dirty(page);
SetPageUptodate(page);
DEBUG(3, "blkmtd: write: writing out partial end\n");
thislen += end_len;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册