]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
kclient: fix unzeroed pages after readpage
authorSage Weil <sage@newdream.net>
Thu, 3 Sep 2009 20:38:21 +0000 (13:38 -0700)
committerSage Weil <sage@newdream.net>
Thu, 3 Sep 2009 20:38:21 +0000 (13:38 -0700)
This was a signed/unsigned comparison problem.  No compiler
warning? :(

src/kernel/addr.c

index a5dd43abc374ff9c04e833be2e6e782b274238bd..6f802daeecdd80efbd21bfb492456cde5cbf1d5e 100644 (file)
@@ -311,7 +311,7 @@ static int ceph_readpages(struct file *file, struct address_space *mapping,
 
                list_del(&page->lru);
 
-               if (rc < PAGE_CACHE_SIZE) {
+               if (rc < (int)PAGE_CACHE_SIZE) {
                        /* zero (remainder of) page */
                        int s = rc < 0 ? 0 : rc;
 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 25)