Commit 7dedd3e1 authored by Jens Axboe's avatar Jens Axboe

Revert "iov_iter: track truncated size"

This reverts commit 2112ff5c.

We no longer need to track the truncation count, the one user that did
need it has been converted to using iov_iter_restore() instead.
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent cd658695
...@@ -53,7 +53,6 @@ struct iov_iter { ...@@ -53,7 +53,6 @@ struct iov_iter {
}; };
loff_t xarray_start; loff_t xarray_start;
}; };
size_t truncated;
}; };
static inline enum iter_type iov_iter_type(const struct iov_iter *i) static inline enum iter_type iov_iter_type(const struct iov_iter *i)
...@@ -270,10 +269,8 @@ static inline void iov_iter_truncate(struct iov_iter *i, u64 count) ...@@ -270,10 +269,8 @@ static inline void iov_iter_truncate(struct iov_iter *i, u64 count)
* conversion in assignement is by definition greater than all * conversion in assignement is by definition greater than all
* values of size_t, including old i->count. * values of size_t, including old i->count.
*/ */
if (i->count > count) { if (i->count > count)
i->truncated += i->count - count;
i->count = count; i->count = count;
}
} }
/* /*
...@@ -282,7 +279,6 @@ static inline void iov_iter_truncate(struct iov_iter *i, u64 count) ...@@ -282,7 +279,6 @@ static inline void iov_iter_truncate(struct iov_iter *i, u64 count)
*/ */
static inline void iov_iter_reexpand(struct iov_iter *i, size_t count) static inline void iov_iter_reexpand(struct iov_iter *i, size_t count)
{ {
i->truncated -= count - i->count;
i->count = count; i->count = count;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment