[prev in list] [next in list] [prev in thread] [next in thread]
List: ceph-devel
Subject: [PATCH] ceph: cast PAGE_SIZE to size_t in ceph_sync_write()
From: Ilya Dryomov <ilya.dryomov () inktank ! com>
Date: 2014-01-28 17:28:40
Message-ID: 1390930120-9863-1-git-send-email-ilya.dryomov () inktank ! com
[Download RAW message or body]
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>
---
fs/ceph/file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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;
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic