diff options
author | Andrew Morton <akpm@osdl.org> | 2005-12-12 03:36:59 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-12-12 11:57:41 -0500 |
commit | 3fe968f167975d10c639f03c4934f05a29da73c0 (patch) | |
tree | 0d76b04b8d422ea5e187fe20cb2c572f69222c82 /drivers/mtd | |
parent | 67121172f9753f38689651b613a4850e0e75876f (diff) |
[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: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/mtd')
-rw-r--r-- | drivers/mtd/devices/blkmtd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/devices/blkmtd.c b/drivers/mtd/devices/blkmtd.c index f9db52f6bf00..04f864d238db 100644 --- a/drivers/mtd/devices/blkmtd.c +++ b/drivers/mtd/devices/blkmtd.c | |||
@@ -113,7 +113,7 @@ static int bi_write_complete(struct bio *bio, unsigned int bytes_done, int error | |||
113 | ClearPageUptodate(page); | 113 | ClearPageUptodate(page); |
114 | SetPageError(page); | 114 | SetPageError(page); |
115 | } | 115 | } |
116 | ClearPageDirty(page); | 116 | clear_page_dirty(page); |
117 | unlock_page(page); | 117 | unlock_page(page); |
118 | page_cache_release(page); | 118 | page_cache_release(page); |
119 | } while (bvec >= bio->bi_io_vec); | 119 | } 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, | |||
289 | BUG(); | 289 | BUG(); |
290 | } | 290 | } |
291 | memcpy(page_address(page)+offset, buf, start_len); | 291 | memcpy(page_address(page)+offset, buf, start_len); |
292 | SetPageDirty(page); | 292 | set_page_dirty(page); |
293 | SetPageUptodate(page); | 293 | SetPageUptodate(page); |
294 | buf += start_len; | 294 | buf += start_len; |
295 | thislen = start_len; | 295 | thislen = start_len; |
@@ -336,7 +336,7 @@ static int write_pages(struct blkmtd_dev *dev, const u_char *buf, loff_t to, | |||
336 | } | 336 | } |
337 | pagenr++; | 337 | pagenr++; |
338 | pagecnt--; | 338 | pagecnt--; |
339 | SetPageDirty(page); | 339 | set_page_dirty(page); |
340 | SetPageUptodate(page); | 340 | SetPageUptodate(page); |
341 | pagesc--; | 341 | pagesc--; |
342 | thislen += PAGE_SIZE; | 342 | thislen += PAGE_SIZE; |
@@ -357,7 +357,7 @@ static int write_pages(struct blkmtd_dev *dev, const u_char *buf, loff_t to, | |||
357 | BUG(); | 357 | BUG(); |
358 | } | 358 | } |
359 | memcpy(page_address(page), buf, end_len); | 359 | memcpy(page_address(page), buf, end_len); |
360 | SetPageDirty(page); | 360 | set_page_dirty(page); |
361 | SetPageUptodate(page); | 361 | SetPageUptodate(page); |
362 | DEBUG(3, "blkmtd: write: writing out partial end\n"); | 362 | DEBUG(3, "blkmtd: write: writing out partial end\n"); |
363 | thislen += end_len; | 363 | thislen += end_len; |