diff options
author | NeilBrown <neilb@suse.de> | 2013-07-16 16:44:29 +1000 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2013-08-27 16:05:32 +1000 |
commit | 60559da4d8c3259ea41a14ca4cfcd83022bff6bd (patch) | |
tree | 4eb200925cc4067a59d0709bde0cf8b19d22e266 /drivers/md/md.c | |
parent | d8dfad3876e4386666b759da3c833d62fb8b2267 (diff) | |
download | blackbird-op-linux-60559da4d8c3259ea41a14ca4cfcd83022bff6bd.tar.gz blackbird-op-linux-60559da4d8c3259ea41a14ca4cfcd83022bff6bd.zip |
md: don't call md_allow_write in get_bitmap_file.
There is no really need as GFP_NOIO is very likely sufficient,
and failure is not catastrophic.
Calling md_allow_write here will convert a read-auto array to
read/write which could be confusing when you are just performing
a read operation.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md/md.c')
-rw-r--r-- | drivers/md/md.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 9f13e13506ef..bba87324c9b2 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c @@ -5628,10 +5628,7 @@ static int get_bitmap_file(struct mddev * mddev, void __user * arg) char *ptr, *buf = NULL; int err = -ENOMEM; - if (md_allow_write(mddev)) - file = kmalloc(sizeof(*file), GFP_NOIO); - else - file = kmalloc(sizeof(*file), GFP_KERNEL); + file = kmalloc(sizeof(*file), GFP_NOIO); if (!file) goto out; |