Commit fc5e58c0 authored by Artem Bityutskiy's avatar Artem Bityutskiy

UBIFS: 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 3d46b316
...@@ -818,7 +818,7 @@ void dbg_dump_leb(const struct ubifs_info *c, int lnum) ...@@ -818,7 +818,7 @@ void dbg_dump_leb(const struct ubifs_info *c, int lnum)
printk(KERN_DEBUG "(pid %d) start dumping LEB %d\n", printk(KERN_DEBUG "(pid %d) start dumping LEB %d\n",
current->pid, lnum); current->pid, lnum);
buf = __vmalloc(c->leb_size, GFP_KERNEL | GFP_NOFS, PAGE_KERNEL); buf = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL);
if (!buf) { if (!buf) {
ubifs_err("cannot allocate memory for dumping LEB %d", lnum); ubifs_err("cannot allocate memory for dumping LEB %d", lnum);
return; return;
......
...@@ -1094,7 +1094,7 @@ static int scan_check_cb(struct ubifs_info *c, ...@@ -1094,7 +1094,7 @@ static int scan_check_cb(struct ubifs_info *c,
} }
} }
buf = __vmalloc(c->leb_size, GFP_KERNEL | GFP_NOFS, PAGE_KERNEL); buf = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL);
if (!buf) { if (!buf) {
ubifs_err("cannot allocate memory to scan LEB %d", lnum); ubifs_err("cannot allocate memory to scan LEB %d", lnum);
goto out; goto out;
......
...@@ -1633,7 +1633,7 @@ static int dbg_check_ltab_lnum(struct ubifs_info *c, int lnum) ...@@ -1633,7 +1633,7 @@ static int dbg_check_ltab_lnum(struct ubifs_info *c, int lnum)
if (!(ubifs_chk_flags & UBIFS_CHK_LPROPS)) if (!(ubifs_chk_flags & UBIFS_CHK_LPROPS))
return 0; return 0;
buf = p = __vmalloc(c->leb_size, GFP_KERNEL | GFP_NOFS, PAGE_KERNEL); buf = p = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL);
if (!buf) { if (!buf) {
ubifs_err("cannot allocate memory for ltab checking"); ubifs_err("cannot allocate memory for ltab checking");
return 0; return 0;
...@@ -1885,7 +1885,7 @@ static void dump_lpt_leb(const struct ubifs_info *c, int lnum) ...@@ -1885,7 +1885,7 @@ static void dump_lpt_leb(const struct ubifs_info *c, int lnum)
printk(KERN_DEBUG "(pid %d) start dumping LEB %d\n", printk(KERN_DEBUG "(pid %d) start dumping LEB %d\n",
current->pid, lnum); current->pid, lnum);
buf = p = __vmalloc(c->leb_size, GFP_KERNEL | GFP_NOFS, PAGE_KERNEL); buf = p = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL);
if (!buf) { if (!buf) {
ubifs_err("cannot allocate memory to dump LPT"); ubifs_err("cannot allocate memory to dump LPT");
return; return;
......
...@@ -898,7 +898,7 @@ static int dbg_scan_orphans(struct ubifs_info *c, struct check_info *ci) ...@@ -898,7 +898,7 @@ static int dbg_scan_orphans(struct ubifs_info *c, struct check_info *ci)
if (c->no_orphs) if (c->no_orphs)
return 0; return 0;
buf = __vmalloc(c->leb_size, GFP_KERNEL | GFP_NOFS, PAGE_KERNEL); buf = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL);
if (!buf) { if (!buf) {
ubifs_err("cannot allocate memory to check orphans"); ubifs_err("cannot allocate memory to check orphans");
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