summaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorIlya Dryomov <ilya.dryomov@inktank.com>2014-01-28 19:16:18 +0200
committerSage Weil <sage@inktank.com>2014-01-28 09:57:21 -0800
commit125d725c923527a85876c031028c7f55c28b74b3 (patch)
treeca470b4d6d71254f5becb292d54f223f3c4fc513 /fs/ceph
parent37b52fe60838b135913e877b0c849e59fae587c3 (diff)
downloadblackbird-op-linux-125d725c923527a85876c031028c7f55c28b74b3.tar.gz
blackbird-op-linux-125d725c923527a85876c031028c7f55c28b74b3.zip
ceph: cast PAGE_SIZE to size_t in ceph_sync_write()
Use min_t(size_t, ...) instead of plain min(), which does strict type checking, to avoid compile warning on i386. Cc: Jianpeng Ma <majianpeng@gmail.com> Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index d10510a4733d..dfd2ce3419f8 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -734,7 +734,7 @@ static ssize_t ceph_sync_write(struct kiocb *iocb, const struct iovec *iov,
left = len;
for (n = 0; n < num_pages; n++) {
- size_t plen = min(left, PAGE_SIZE);
+ size_t plen = min_t(size_t, left, PAGE_SIZE);
ret = iov_iter_copy_from_user(pages[n], &i, 0, plen);
if (ret != plen) {
ret = -EFAULT;
OpenPOWER on IntegriCloud