Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

NeilBrown 60559da4 d8dfad38

+1 -4
+1 -4
drivers/md/md.c
··· 5628 5628 char *ptr, *buf = NULL; 5629 5629 int err = -ENOMEM; 5630 5630 5631 - if (md_allow_write(mddev)) 5632 - file = kmalloc(sizeof(*file), GFP_NOIO); 5633 - else 5634 - file = kmalloc(sizeof(*file), GFP_KERNEL); 5631 + file = kmalloc(sizeof(*file), GFP_NOIO); 5635 5632 5636 5633 if (!file) 5637 5634 goto out;