[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220901161722.739d2013@canb.auug.org.au>
Date: Thu, 1 Sep 2022 16:17:22 +1000
From: Stephen Rothwell <sfr@...b.auug.org.au>
To: Andrew Morton <akpm@...ux-foundation.org>,
Jens Axboe <axboe@...nel.dk>
Cc: John Hubbard <jhubbard@...dia.com>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Linux Next Mailing List <linux-next@...r.kernel.org>
Subject: linux-next: manual merge of the mm tree with the block tree
Hi all,
Today's linux-next merge of the mm tree got a conflict in:
block/blk-map.c
between commit:
e88811bc43b9 ("block: use on-stack page vec for <= UIO_FASTIOV")
from the block tree and commit:
2e9a2aa23dad ("block, bio, fs: convert most filesystems to pin_user_pages_fast()")
from the mm tree.
I fixed it up (I think - see below) and can carry the fix as
necessary. This is now fixed as far as linux-next is concerned, but any
non trivial conflicts should be mentioned to your upstream maintainer
when your tree is submitted for merging. You may also want to consider
cooperating with the maintainer of the conflicting tree to minimise any
particularly complex conflicts.
--
Cheers,
Stephen Rothwell
diff --cc block/blk-map.c
index f3768876d618,4e333ad9776d..000000000000
--- a/block/blk-map.c
+++ b/block/blk-map.c
@@@ -273,14 -254,8 +273,14 @@@ static int bio_map_user_iov(struct requ
size_t offs, added = 0;
int npages;
- bytes = dio_w_iov_iter_pin_pages_alloc(iter, &pages, LONG_MAX,
- &offs);
+ if (nr_vecs <= ARRAY_SIZE(stack_pages)) {
+ pages = stack_pages;
- bytes = iov_iter_get_pages2(iter, pages, LONG_MAX,
++ bytes = dio_w_iov_iter_pin_pages(iter, pages, LONG_MAX,
+ nr_vecs, &offs);
+ } else {
- bytes = iov_iter_get_pages_alloc2(iter, &pages,
++ bytes = dio_w_iov_iter_pin_pages_alloc(iter, &pages,
+ LONG_MAX, &offs);
+ }
if (unlikely(bytes <= 0)) {
ret = bytes ? bytes : -EFAULT;
goto out_unmap;
@@@ -315,9 -290,8 +315,9 @@@
* release the pages we didn't map into the bio, if any
*/
while (j < npages)
- put_page(pages[j++]);
+ dio_w_unpin_user_page(pages[j++]);
- kvfree(pages);
+ if (pages != stack_pages)
+ kvfree(pages);
/* couldn't stuff something into bio? */
if (bytes) {
iov_iter_revert(iter, bytes);
Content of type "application/pgp-signature" skipped
Powered by blists - more mailing lists