aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/md/bitmap.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-01-06 03:20:40 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 11:34:07 -0500
commit1345b1d8adbdeceb1c871d9a4af5e2a700b341c6 (patch)
tree0da1db7d273752ad5281db415e9245f3f3a63383 /drivers/md/bitmap.c
parent7dd5d34c6c2da04e8cd0732e08b33cd3359e4bae (diff)
[PATCH] md: define and use safe_put_page for md
md sometimes call put_page on NULL pointers (treating it like kfree). This is not safe, so define and use a 'safe_put_page' which checks for NULL. Signed-off-by: Neil Brown <neilb@suse.de> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/md/bitmap.c')
-rw-r--r--drivers/md/bitmap.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c
index abe415f0c039..ee4a3424a8a3 100644
--- a/drivers/md/bitmap.c
+++ b/drivers/md/bitmap.c
@@ -626,8 +626,7 @@ static void bitmap_file_unmap(struct bitmap *bitmap)
626 kfree(map); 626 kfree(map);
627 kfree(attr); 627 kfree(attr);
628 628
629 if (sb_page) 629 safe_put_page(sb_page);
630 put_page(sb_page);
631} 630}
632 631
633static void bitmap_stop_daemon(struct bitmap *bitmap); 632static void bitmap_stop_daemon(struct bitmap *bitmap);