aboutsummaryrefslogtreecommitdiffstats
path: root/net/ceph/messenger.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/ceph/messenger.c')
-rw-r--r--net/ceph/messenger.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index e51cad0db580..b2f571dd933d 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -901,7 +901,7 @@ static void ceph_msg_data_pages_cursor_init(struct ceph_msg_data_cursor *cursor,
901 BUG_ON(page_count > (int)USHRT_MAX); 901 BUG_ON(page_count > (int)USHRT_MAX);
902 cursor->page_count = (unsigned short)page_count; 902 cursor->page_count = (unsigned short)page_count;
903 BUG_ON(length > SIZE_MAX - cursor->page_offset); 903 BUG_ON(length > SIZE_MAX - cursor->page_offset);
904 cursor->last_piece = (size_t)cursor->page_offset + length <= PAGE_SIZE; 904 cursor->last_piece = cursor->page_offset + cursor->resid <= PAGE_SIZE;
905} 905}
906 906
907static struct page * 907static struct page *