Commit 3d46b316 authored by Artem Bityutskiy's avatar Artem Bityutskiy

UBI: use GFP_NOFS properly

This patch fixes a brown-paperbag bug which was introduced by me:
I used incorrect "GFP_KERNEL | GFP_NOFS" allocation flags to make
sure my allocations do not cause write-back. But the correct form
is "GFP_NOFS".
Signed-off-by: default avatarArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
parent 4bbba111
...@@ -1345,7 +1345,7 @@ int ubi_dbg_check_write(struct ubi_device *ubi, const void *buf, int pnum, ...@@ -1345,7 +1345,7 @@ int ubi_dbg_check_write(struct ubi_device *ubi, const void *buf, int pnum,
if (!(ubi_chk_flags & UBI_CHK_IO)) if (!(ubi_chk_flags & UBI_CHK_IO))
return 0; return 0;
buf1 = __vmalloc(len, GFP_KERNEL | GFP_NOFS, PAGE_KERNEL); buf1 = __vmalloc(len, GFP_NOFS, PAGE_KERNEL);
if (!buf1) { if (!buf1) {
ubi_err("cannot allocate memory to check writes"); ubi_err("cannot allocate memory to check writes");
return 0; return 0;
...@@ -1409,7 +1409,7 @@ int ubi_dbg_check_all_ff(struct ubi_device *ubi, int pnum, int offset, int len) ...@@ -1409,7 +1409,7 @@ int ubi_dbg_check_all_ff(struct ubi_device *ubi, int pnum, int offset, int len)
if (!(ubi_chk_flags & UBI_CHK_IO)) if (!(ubi_chk_flags & UBI_CHK_IO))
return 0; return 0;
buf = __vmalloc(len, GFP_KERNEL | GFP_NOFS, PAGE_KERNEL); buf = __vmalloc(len, GFP_NOFS, PAGE_KERNEL);
if (!buf) { if (!buf) {
ubi_err("cannot allocate memory to check for 0xFFs"); ubi_err("cannot allocate memory to check for 0xFFs");
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment