Skip to content

Commit

Permalink
ceph: fix dout() compile warnings in ceph_filemap_fault()
Browse files Browse the repository at this point in the history
PAGE_CACHE_SIZE is unsigned long on all architectures, however size_t
is either unsigned int or unsigned long.  Rather than change format
strings, cast PAGE_CACHE_SIZE to size_t to be in line with dout()s in
ceph_page_mkwrite().

Cc: Yan, Zheng <zheng.z.yan@intel.com>
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
  • Loading branch information
Ilya Dryomov authored and Sage Weil committed Jan 28, 2014
1 parent 80e163a commit 37b52fe
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fs/ceph/addr.c
Original file line number Diff line number Diff line change
Expand Up @@ -1220,7 +1220,7 @@ static int ceph_filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
int want, got, ret;

dout("filemap_fault %p %llx.%llx %llu~%zd trying to get caps\n",
inode, ceph_vinop(inode), off, PAGE_CACHE_SIZE);
inode, ceph_vinop(inode), off, (size_t)PAGE_CACHE_SIZE);
if (fi->fmode & CEPH_FILE_MODE_LAZY)
want = CEPH_CAP_FILE_CACHE | CEPH_CAP_FILE_LAZYIO;
else
Expand All @@ -1236,12 +1236,12 @@ static int ceph_filemap_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
}
}
dout("filemap_fault %p %llu~%zd got cap refs on %s\n",
inode, off, PAGE_CACHE_SIZE, ceph_cap_string(got));
inode, off, (size_t)PAGE_CACHE_SIZE, ceph_cap_string(got));

ret = filemap_fault(vma, vmf);

dout("filemap_fault %p %llu~%zd dropping cap refs on %s ret %d\n",
inode, off, PAGE_CACHE_SIZE, ceph_cap_string(got), ret);
inode, off, (size_t)PAGE_CACHE_SIZE, ceph_cap_string(got), ret);
ceph_put_cap_refs(ci, got);

return ret;
Expand Down

0 comments on commit 37b52fe

Please sign in to comment.