[PATCH v2] libceph: advancing variants of iov_iter_get_pages()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Xiubo Li <xiubli@xxxxxxxxxx>

The upper layer has changed it to iov_iter_get_pages2(). And this
should be folded into the previous commit.

Reviewed-by: Jeff Layton <jlayton@xxxxxxxxxx>
Signed-off-by: Xiubo Li <xiubli@xxxxxxxxxx>
---
 net/ceph/messenger.c | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)

diff --git a/net/ceph/messenger.c b/net/ceph/messenger.c
index 945f6d1a9efa..6caf8a2ff4ae 100644
--- a/net/ceph/messenger.c
+++ b/net/ceph/messenger.c
@@ -985,24 +985,18 @@ static struct page *ceph_msg_data_iter_next(struct ceph_msg_data_cursor *cursor,
 	if (cursor->lastlen)
 		iov_iter_revert(&cursor->iov_iter, cursor->lastlen);
 
-	len = iov_iter_get_pages(&cursor->iov_iter, &page, PAGE_SIZE,
-				 1, page_offset);
+	len = iov_iter_get_pages2(&cursor->iov_iter, &page, PAGE_SIZE,
+				  1, page_offset);
 	BUG_ON(len < 0);
 
 	cursor->lastlen = len;
 
-	/*
-	 * FIXME: Al Viro says that he will soon change iov_iter_get_pages
-	 * to auto-advance the iterator. Emulate that here for now.
-	 */
-	iov_iter_advance(&cursor->iov_iter, len);
-
 	/*
 	 * FIXME: The assumption is that the pages represented by the iov_iter
-	 * 	  are pinned, with the references held by the upper-level
-	 * 	  callers, or by virtue of being under writeback. Eventually,
-	 * 	  we'll get an iov_iter_get_pages variant that doesn't take page
-	 * 	  refs. Until then, just put the page ref.
+	 *	  are pinned, with the references held by the upper-level
+	 *	  callers, or by virtue of being under writeback. Eventually,
+	 *	  we'll get an iov_iter_get_pages2 variant that doesn't take page
+	 *	  refs. Until then, just put the page ref.
 	 */
 	VM_BUG_ON_PAGE(!PageWriteback(page) && page_count(page) < 2, page);
 	put_page(page);
-- 
2.36.0.rc1




[Index of Archives]     [CEPH Users]     [Ceph Large]     [Ceph Dev]     [Information on CEPH]     [Linux BTRFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux