summaryrefslogtreecommitdiffstats
path: root/drivers/md/raid6main.c
diff options
context:
space:
mode:
authorNeilBrown <neilb@suse.de>2006-01-06 09:20:40 +0100
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 17:34:07 +0100
commit1345b1d8adbdeceb1c871d9a4af5e2a700b341c6 (patch)
tree0da1db7d273752ad5281db415e9245f3f3a63383 /drivers/md/raid6main.c
parent[PATCH] md: remove inappropriate limits in md/bitmap configuration. (diff)
downloadlinux-1345b1d8adbdeceb1c871d9a4af5e2a700b341c6.tar.xz
linux-1345b1d8adbdeceb1c871d9a4af5e2a700b341c6.zip
[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/raid6main.c')
-rw-r--r--drivers/md/raid6main.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/md/raid6main.c b/drivers/md/raid6main.c
index 950e5fa6e1f2..06b32bd671a3 100644
--- a/drivers/md/raid6main.c
+++ b/drivers/md/raid6main.c
@@ -2072,8 +2072,7 @@ static int run(mddev_t *mddev)
abort:
if (conf) {
print_raid6_conf(conf);
- if (conf->spare_page)
- put_page(conf->spare_page);
+ safe_put_page(conf->spare_page);
kfree(conf->stripe_hashtbl);
kfree(conf);
}