]> www.infradead.org Git - users/jedix/linux-maple.git/commit
iov_iter: add a shorten call
authorZach Brown <zach.brown@oracle.com>
Fri, 3 Sep 2010 18:37:58 +0000 (11:37 -0700)
committerDave Kleikamp <dave.kleikamp@oracle.com>
Fri, 13 Jan 2012 00:11:27 +0000 (18:11 -0600)
commitf4fd63e1f1b297565a0129b9aa3990c0f6942120
tree5bb825d3c4cc1458fd04c7b9abdc6096c7b24287
parent892f3253be6f257043f1f1235d7e1a338166a8c7
iov_iter: add a shorten call

The generic direct write path wants to shorten its memory vector.  It
does this when it finds that it has to perform a partial write due to
LIMIT_FSIZE.  .direct_IO() always performs IO on all of the referenced
memory because it doesn't have an argument to specify the length of the
IO.

We add an iov_iter operation for this so that the generic path can ask
to shorten the memory vector without having to know what kind it is.
We're happy to shorten the kernel copy of the iovec array, but we refuse
to shorten the bio_vec array and return an error in this case.

Signed-off-by: Zach Brown <zach.brown@oracle.com>
include/linux/fs.h
mm/iov-iter.c