]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: fix bad kmalloc
authorSage Weil <sage@newdream.net>
Thu, 23 Jul 2009 17:39:32 +0000 (10:39 -0700)
committerSage Weil <sage@newdream.net>
Thu, 23 Jul 2009 18:50:35 +0000 (11:50 -0700)
src/kernel/addr.c

index 0f51c3163a32f405af56e3b4d0290763fb3eda3c..5cc9b64ae70ddedddf556267335b573e620ece20 100644 (file)
@@ -589,7 +589,9 @@ static int ceph_writepages_start(struct address_space *mapping,
                wsize = PAGE_CACHE_SIZE;
        max_pages_ever = wsize >> PAGE_CACHE_SHIFT;
 
-       pvec = kmalloc(sizeof(*pvec), GFP_KERNEL);
+       pvec = kmalloc(sizeof(*pvec), GFP_NOFS);
+       if (!pvec)
+               return -ENOMEM;
        pagevec_init(pvec, 0);
 
        /* ?? */