diff options
author | Andrew Morton <akpm@osdl.org> | 2006-03-24 06:18:11 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-03-24 10:33:26 -0500 |
commit | 4741c9fd36b3bcadd37238321c469049da94a4b9 (patch) | |
tree | 4b3031b04cdbf2d3c5a4fcc1965ed857f1cf0ce4 /drivers | |
parent | fa5a734e406b53761fcc5ee22366006f71112c2d (diff) |
[PATCH] set_page_dirty() return value fixes
We need set_page_dirty() to return true if it actually transitioned the page
from a clean to dirty state. This wasn't right in a couple of places. Do a
kernel-wide audit, fix things up.
This leaves open the possibility of returning a negative errno from
set_page_dirty() sometime in the future. But we don't do that at present.
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/block/rd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/block/rd.c b/drivers/block/rd.c index 1c54f46d3f70..940bfd7951e5 100644 --- a/drivers/block/rd.c +++ b/drivers/block/rd.c | |||
@@ -186,7 +186,8 @@ static int ramdisk_writepages(struct address_space *mapping, | |||
186 | */ | 186 | */ |
187 | static int ramdisk_set_page_dirty(struct page *page) | 187 | static int ramdisk_set_page_dirty(struct page *page) |
188 | { | 188 | { |
189 | SetPageDirty(page); | 189 | if (!TestSetPageDirty(page)) |
190 | return 1; | ||
190 | return 0; | 191 | return 0; |
191 | } | 192 | } |
192 | 193 | ||