diff options
author | Geliang Tang <geliangtang@163.com> | 2015-11-16 08:46:32 -0500 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2016-01-21 13:36:07 -0500 |
commit | 17ddc49b9c5c8847be745d13d91259248d59114b (patch) | |
tree | deb3d32ac2106bb7c104048653b602f74652260b /net/ceph | |
parent | 79a3ed2e98557a2844e75c203e742f9c229ad1d3 (diff) |
libceph: use list_next_entry instead of list_entry_next
list_next_entry has been defined in list.h, so I replace list_entry_next
with it.
Signed-off-by: Geliang Tang <geliangtang@163.com>
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'net/ceph')
-rw-r--r-- | net/ceph/messenger.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c index 9981039ef4ff..b1d1489543b1 100644 --- a/net/ceph/messenger.c +++ b/net/ceph/messenger.c | |||
@@ -23,9 +23,6 @@ | |||
23 | #include <linux/ceph/pagelist.h> | 23 | #include <linux/ceph/pagelist.h> |
24 | #include <linux/export.h> | 24 | #include <linux/export.h> |
25 | 25 | ||
26 | #define list_entry_next(pos, member) \ | ||
27 | list_entry(pos->member.next, typeof(*pos), member) | ||
28 | |||
29 | /* | 26 | /* |
30 | * Ceph uses the messenger to exchange ceph_msg messages with other | 27 | * Ceph uses the messenger to exchange ceph_msg messages with other |
31 | * hosts in the system. The messenger provides ordered and reliable | 28 | * hosts in the system. The messenger provides ordered and reliable |
@@ -1042,7 +1039,7 @@ static bool ceph_msg_data_pagelist_advance(struct ceph_msg_data_cursor *cursor, | |||
1042 | /* Move on to the next page */ | 1039 | /* Move on to the next page */ |
1043 | 1040 | ||
1044 | BUG_ON(list_is_last(&cursor->page->lru, &pagelist->head)); | 1041 | BUG_ON(list_is_last(&cursor->page->lru, &pagelist->head)); |
1045 | cursor->page = list_entry_next(cursor->page, lru); | 1042 | cursor->page = list_next_entry(cursor->page, lru); |
1046 | cursor->last_piece = cursor->resid <= PAGE_SIZE; | 1043 | cursor->last_piece = cursor->resid <= PAGE_SIZE; |
1047 | 1044 | ||
1048 | return true; | 1045 | return true; |
@@ -1166,7 +1163,7 @@ static bool ceph_msg_data_advance(struct ceph_msg_data_cursor *cursor, | |||
1166 | if (!cursor->resid && cursor->total_resid) { | 1163 | if (!cursor->resid && cursor->total_resid) { |
1167 | WARN_ON(!cursor->last_piece); | 1164 | WARN_ON(!cursor->last_piece); |
1168 | BUG_ON(list_is_last(&cursor->data->links, cursor->data_head)); | 1165 | BUG_ON(list_is_last(&cursor->data->links, cursor->data_head)); |
1169 | cursor->data = list_entry_next(cursor->data, links); | 1166 | cursor->data = list_next_entry(cursor->data, links); |
1170 | __ceph_msg_data_cursor_init(cursor); | 1167 | __ceph_msg_data_cursor_init(cursor); |
1171 | new_piece = true; | 1168 | new_piece = true; |
1172 | } | 1169 | } |