[PATCH 29/29] iov_iter: Remove iterate_all_kinds() and iterate_and_advance()

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

 



Remove iterate_all_kinds() and iterate_and_advance() as they're no longer
used, having been split.

Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
---

 lib/iov_iter.c |   61 --------------------------------------------------------
 1 file changed, 61 deletions(-)

diff --git a/lib/iov_iter.c b/lib/iov_iter.c
index db798966823e..ba6b60c45103 100644
--- a/lib/iov_iter.c
+++ b/lib/iov_iter.c
@@ -86,26 +86,6 @@ static inline bool page_copy_sane(struct page *page, size_t offset, size_t n);
 	}						\
 }
 
-#define iterate_all_kinds(i, n, v, I, B, K) {			\
-	if (likely(n)) {					\
-		size_t skip = i->iov_offset;			\
-		if (unlikely(iov_iter_type(i) & ITER_BVEC)) {		\
-			struct bio_vec v;			\
-			struct bvec_iter __bi;			\
-			iterate_bvec(i, n, v, __bi, skip, (B))	\
-		} else if (unlikely(iov_iter_type(i) & ITER_KVEC)) {	\
-			const struct kvec *kvec;		\
-			struct kvec v;				\
-			iterate_kvec(i, n, v, kvec, skip, (K))	\
-		} else if (unlikely(iov_iter_type(i) & ITER_DISCARD)) {	\
-		} else {					\
-			const struct iovec *iov;		\
-			struct iovec v;				\
-			iterate_iovec(i, n, v, iov, skip, (I))	\
-		}						\
-	}							\
-}
-
 #define iterate_over_iovec(i, n, v, CMD) {			\
 	if (likely(n)) {					\
 		size_t skip = i->iov_offset;			\
@@ -133,47 +113,6 @@ static inline bool page_copy_sane(struct page *page, size_t offset, size_t n);
 	}							\
 }
 
-#define iterate_and_advance(i, n, v, I, B, K) {			\
-	if (unlikely(i->count < n))				\
-		n = i->count;					\
-	if (i->count) {						\
-		size_t skip = i->iov_offset;			\
-		if (unlikely(iov_iter_type(i) & ITER_BVEC)) {		\
-			const struct bio_vec *bvec = i->bvec;	\
-			struct bio_vec v;			\
-			struct bvec_iter __bi;			\
-			iterate_bvec(i, n, v, __bi, skip, (B))	\
-			i->bvec = __bvec_iter_bvec(i->bvec, __bi);	\
-			i->nr_segs -= i->bvec - bvec;		\
-			skip = __bi.bi_bvec_done;		\
-		} else if (unlikely(iov_iter_type(i) & ITER_KVEC)) {	\
-			const struct kvec *kvec;		\
-			struct kvec v;				\
-			iterate_kvec(i, n, v, kvec, skip, (K))	\
-			if (skip == kvec->iov_len) {		\
-				kvec++;				\
-				skip = 0;			\
-			}					\
-			i->nr_segs -= kvec - i->kvec;		\
-			i->kvec = kvec;				\
-		} else if (unlikely(iov_iter_type(i) & ITER_DISCARD)) {	\
-			skip += n;				\
-		} else {					\
-			const struct iovec *iov;		\
-			struct iovec v;				\
-			iterate_iovec(i, n, v, iov, skip, (I))	\
-			if (skip == iov->iov_len) {		\
-				iov++;				\
-				skip = 0;			\
-			}					\
-			i->nr_segs -= iov - i->iov;		\
-			i->iov = iov;				\
-		}						\
-		i->count -= n;					\
-		i->iov_offset = skip;				\
-	}							\
-}
-
 #define iterate_and_advance_iovec(i, n, v, CMD) {		\
 	if (unlikely(i->count < n))				\
 		n = i->count;					\





[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux