md/bitmap:Don't use IS_ERR to judge alloc_page().
PATCH 1/1 md/bitmap:Don't use IS_ERR to judge alloc_page().
Signed-off-by Jianpeng Ma <[email protected]>
--- drivers/md/bitmap.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)
drivers/md/bitmap.c +2 -5
@@ -476,11 +476,8 @@ static int bitmap_new_disk_sb(struct bitmap *bitmap)int err = -EINVAL ; bitmap->storage.sb_page =alloc_page (GFP_KERNEL ); -if (IS_ERR (bitmap->storage.sb_page)) { - err =PTR_ERR (bitmap->storage.sb_page); - bitmap->storage.sb_page =NULL ; -return err; - } +if (bitmap->storage.sb_page ==NULL ) +return -ENOMEM ; bitmap->storage.sb_page->index =0 ; sb =kmap_atomic (bitmap->storage.sb_page);
Signature · 1 line
1.7.9.5
NeilBrown
AppliedQuoted 13 lines · On Sat, 15 Sep 2012 10:43:00 +0800 "Jianpeng Ma" <[email protected]> wrote:
Signed-off-by Jianpeng Ma <[email protected]>--- drivers/md/bitmap.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-)drivers/md/bitmap.c +0
-0@@ -476,11 +476,8 @@ static int bitmap_new_disk_sb(struct bitmap *bitmap)int err = -EINVAL ; bitmap->storage.sb_page =alloc_page (GFP_KERNEL );
drivers/md/bitmap.c static int bitmap_new_disk_sb(struct bitmap *bitmap) · line 483
Quoted 10 lines
drivers/md/bitmap.c +2
-5-if (IS_ERR (bitmap->storage.sb_page)) { - err =PTR_ERR (bitmap->storage.sb_page); - bitmap->storage.sb_page =NULL ; -return err; - } +if (bitmap->storage.sb_page ==NULL ) +return -ENOMEM ; bitmap->storage.sb_page->index =0 ; sb =kmap_atomic (bitmap->storage.sb_page);
Applied,
Thanks,
NeilBrown