UBIFS: use GFP_NOFS properly
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Thu, 24 Mar 2011 14:14:26 +0000 (16:14 +0200)
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
Thu, 24 Mar 2011 14:14:26 +0000 (16:14 +0200)
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: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
fs/ubifs/debug.c
fs/ubifs/lprops.c
fs/ubifs/lpt_commit.c
fs/ubifs/orphan.c

index 01c2b028e52570e13afa64c2440145070ea1f2d7..f25a7339f80028427f5ca8208f0839facbe6a25b 100644 (file)
@@ -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",
               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) {
                ubifs_err("cannot allocate memory for dumping LEB %d", lnum);
                return;
index c7b25e2f7764dd83fcf7db60cebe5c191aa6a3c2..0ee0847f24218b0e44cfefeb888dc501b8d159f1 100644 (file)
@@ -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) {
                ubifs_err("cannot allocate memory to scan LEB %d", lnum);
                goto out;
index 0a3c2c3f5c4a305675d94f2a191d4b362879c869..0c9c69bd983a94c0854d90508a15832b99b6fe0f 100644 (file)
@@ -1633,7 +1633,7 @@ static int dbg_check_ltab_lnum(struct ubifs_info *c, int lnum)
        if (!(ubifs_chk_flags & UBIFS_CHK_LPROPS))
                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) {
                ubifs_err("cannot allocate memory for ltab checking");
                return 0;
@@ -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",
               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) {
                ubifs_err("cannot allocate memory to dump LPT");
                return;
index 2cdbd31641d7eff40681cae07547935f443d7b0f..09df318e368f492f3d249f97680c1f9b479393c7 100644 (file)
@@ -898,7 +898,7 @@ static int dbg_scan_orphans(struct ubifs_info *c, struct check_info *ci)
        if (c->no_orphs)
                return 0;
 
-       buf = __vmalloc(c->leb_size, GFP_KERNEL | GFP_NOFS, PAGE_KERNEL);
+       buf = __vmalloc(c->leb_size, GFP_NOFS, PAGE_KERNEL);
        if (!buf) {
                ubifs_err("cannot allocate memory to check orphans");
                return 0;
This page took 0.031744 seconds and 5 git commands to generate.