]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: no fallback to writepage, be careful with wsize
authorSage Weil <sage@newdream.net>
Fri, 22 Aug 2008 18:15:50 +0000 (11:15 -0700)
committerSage Weil <sage@newdream.net>
Fri, 22 Aug 2008 18:15:50 +0000 (11:15 -0700)
src/kernel/addr.c

index 0ae99fd9801ed7cac5244190016b3a330baee5a9..c14abc86e42e336e7a77c28640d924f975dab161 100644 (file)
@@ -357,13 +357,11 @@ static int ceph_writepages(struct address_space *mapping,
 
        if (client->mount_args.wsize && client->mount_args.wsize < wsize)
                wsize = client->mount_args.wsize;
+       if (wsize < PAGE_CACHE_SIZE)
+               wsize = PAGE_CACHE_SIZE;
 
        dout(10, "writepages on %p, wsize %u\n", inode, wsize);
 
-       /* if wsize is small, write 1 page at a time */
-       if (wsize < PAGE_CACHE_SIZE)
-               return generic_writepages(mapping, wbc);
-
        /* larger page vector? */
        max_pages = wsize >> PAGE_CACHE_SHIFT;
        pages = kmalloc(max_pages * sizeof(*pages), GFP_NOFS);