linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux-next: manual merge of the mm tree with the block tree
@ 2022-09-01  6:17 Stephen Rothwell
  2022-09-01  7:47 ` John Hubbard
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Rothwell @ 2022-09-01  6:17 UTC (permalink / raw)
  To: Andrew Morton, Jens Axboe
  Cc: John Hubbard, Linux Kernel Mailing List, Linux Next Mailing List

[-- Attachment #1: Type: text/plain, Size: 1921 bytes --]

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);

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread
* linux-next: manual merge of the mm tree with the block tree
@ 2022-11-10  6:55 Stephen Rothwell
  0 siblings, 0 replies; 7+ messages in thread
From: Stephen Rothwell @ 2022-11-10  6:55 UTC (permalink / raw)
  To: Andrew Morton, Jens Axboe
  Cc: Dan Williams, Linux Kernel Mailing List, Linux Next Mailing List,
	Logan Gunthorpe

[-- Attachment #1: Type: text/plain, Size: 2314 bytes --]

Hi all,

Today's linux-next merge of the mm tree got conflicts in:

  mm/gup.c
  mm/huge_memory.c

between commits:

  0f0892356fa1 ("mm: allow multiple error returns in try_grab_page()")
  4003f107fa2e ("mm: introduce FOLL_PCI_P2PDMA to gate getting PCI P2PDMA pages")

from the block tree and commit:

  7928e6cb4ec6 ("mm/gup: drop DAX pgmap accounting")

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 mm/gup.c
index 8a4b1a783cb6,5182abaaecde..000000000000
--- a/mm/gup.c
+++ b/mm/gup.c
@@@ -2482,26 -2394,10 +2406,13 @@@ static int __gup_device_huge(unsigned l
  	do {
  		struct page *page = pfn_to_page(pfn);
  
- 		pgmap = get_dev_pagemap(pfn, pgmap);
- 		if (unlikely(!pgmap)) {
- 			undo_dev_pagemap(nr, nr_start, flags, pages);
- 			break;
- 		}
- 
- 		if (!(flags & FOLL_PCI_P2PDMA) && is_pci_p2pdma_page(page)) {
- 			undo_dev_pagemap(nr, nr_start, flags, pages);
++		if (!(flags & FOLL_PCI_P2PDMA) && is_pci_p2pdma_page(page))
 +			break;
- 		}
 +
  		SetPageReferenced(page);
  		pages[*nr] = page;
- 		if (unlikely(try_grab_page(page, flags))) {
- 			undo_dev_pagemap(nr, nr_start, flags, pages);
 -		if (unlikely(!try_grab_page(page, flags)))
++		if (unlikely(try_grab_page(page, flags)))
  			break;
- 		}
  		(*nr)++;
  		pfn++;
  	} while (addr += PAGE_SIZE, addr != end);
diff --cc mm/huge_memory.c
index a075e3803e5e,ed12cd3acbfd..000000000000
--- a/mm/huge_memory.c
+++ b/mm/huge_memory.c
@@@ -1225,14 -1179,9 +1180,11 @@@ struct page *follow_devmap_pud(struct v
  		return ERR_PTR(-EEXIST);
  
  	pfn += (addr & ~PUD_MASK) >> PAGE_SHIFT;
- 	*pgmap = get_dev_pagemap(pfn, *pgmap);
- 	if (!*pgmap)
- 		return ERR_PTR(-EFAULT);
  	page = pfn_to_page(pfn);
 -	if (!try_grab_page(page, flags))
 -		page = ERR_PTR(-ENOMEM);
 +
 +	ret = try_grab_page(page, flags);
 +	if (ret)
 +		page = ERR_PTR(ret);
  
  	return page;
  }

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-11-10  6:56 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-01  6:17 linux-next: manual merge of the mm tree with the block tree Stephen Rothwell
2022-09-01  7:47 ` John Hubbard
2022-09-01 14:10   ` Jens Axboe
2022-09-02  7:02     ` John Hubbard
2022-09-02 11:49       ` Jens Axboe
2022-09-02 13:58       ` Andrew Morton
2022-11-10  6:55 Stephen Rothwell

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).