diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/ceph/messenger.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index b9d7df17570..6ff7d9dc240 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c @@ -904,7 +904,7 @@ static void ceph_msg_data_pages_cursor_init(struct ceph_msg_data_cursor *cursor, BUG_ON(page_count > (int)USHRT_MAX); cursor->page_count = (unsigned short)page_count; BUG_ON(length > SIZE_MAX - cursor->page_offset); - cursor->last_piece = (size_t)cursor->page_offset + length <= PAGE_SIZE; + cursor->last_piece = cursor->page_offset + cursor->resid <= PAGE_SIZE; } static struct page * |