diff options
Diffstat (limited to 'net/ceph')
-rw-r--r-- | net/ceph/messenger.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 30efc5c18622..4f55f9ce63fa 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c | |||
@@ -919,6 +919,9 @@ static bool ceph_msg_data_pages_advance(struct ceph_msg_data_cursor *cursor, | |||
919 | if (!bytes || cursor->page_offset) | 919 | if (!bytes || cursor->page_offset) |
920 | return false; /* more bytes to process in the current page */ | 920 | return false; /* more bytes to process in the current page */ |
921 | 921 | ||
922 | if (!cursor->resid) | ||
923 | return false; /* no more data */ | ||
924 | |||
922 | /* Move on to the next page; offset is already at 0 */ | 925 | /* Move on to the next page; offset is already at 0 */ |
923 | 926 | ||
924 | BUG_ON(cursor->page_index >= cursor->page_count); | 927 | BUG_ON(cursor->page_index >= cursor->page_count); |
@@ -1004,6 +1007,9 @@ static bool ceph_msg_data_pagelist_advance(struct ceph_msg_data_cursor *cursor, | |||
1004 | if (!bytes || cursor->offset & ~PAGE_MASK) | 1007 | if (!bytes || cursor->offset & ~PAGE_MASK) |
1005 | return false; /* more bytes to process in the current page */ | 1008 | return false; /* more bytes to process in the current page */ |
1006 | 1009 | ||
1010 | if (!cursor->resid) | ||
1011 | return false; /* no more data */ | ||
1012 | |||
1007 | /* Move on to the next page */ | 1013 | /* Move on to the next page */ |
1008 | 1014 | ||
1009 | BUG_ON(list_is_last(&cursor->page->lru, &pagelist->head)); | 1015 | BUG_ON(list_is_last(&cursor->page->lru, &pagelist->head)); |