Skip to content

Commit 7dedd3e

Browse files
committed
Revert "iov_iter: track truncated size"
This reverts commit 2112ff5. 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: Jens Axboe <axboe@kernel.dk>
1 parent cd65869 commit 7dedd3e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

include/linux/uio.h

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ struct iov_iter {
5353
};
5454
loff_t xarray_start;
5555
};
56-
size_t truncated;
5756
};
5857

5958
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)
270269
* conversion in assignement is by definition greater than all
271270
* values of size_t, including old i->count.
272271
*/
273-
if (i->count > count) {
274-
i->truncated += i->count - count;
272+
if (i->count > count)
275273
i->count = count;
276-
}
277274
}
278275

279276
/*
@@ -282,7 +279,6 @@ static inline void iov_iter_truncate(struct iov_iter *i, u64 count)
282279
*/
283280
static inline void iov_iter_reexpand(struct iov_iter *i, size_t count)
284281
{
285-
i->truncated -= count - i->count;
286282
i->count = count;
287283
}
288284

0 commit comments

Comments
 (0)