All of lore.kernel.org
 help / color / mirror / Atom feed
* linux-next: manual merge of the folio tree with the xfs tree
@ 2021-08-11  7:42 Stephen Rothwell
  2021-08-11 14:43 ` Darrick J. Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Stephen Rothwell @ 2021-08-11  7:42 UTC (permalink / raw)
  To: Matthew Wilcox, Darrick J. Wong, David Chinner, linux-xfs
  Cc: Dave Chinner, Linux Kernel Mailing List, Linux Next Mailing List

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

Hi all,

Today's linux-next merge of the folio tree got a conflict in:

  mm/util.c

between commit:

  de2860f46362 ("mm: Add kvrealloc()")

from the xfs tree and commit:

  3bc0556bade4 ("mm: Add folio_raw_mapping()")

from the folio tree.

I fixed it up (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/util.c
index d06e48b28eec,e8fa30e48447..000000000000
--- a/mm/util.c
+++ b/mm/util.c
@@@ -660,31 -635,6 +660,21 @@@ void kvfree_sensitive(const void *addr
  }
  EXPORT_SYMBOL(kvfree_sensitive);
  
 +void *kvrealloc(const void *p, size_t oldsize, size_t newsize, gfp_t flags)
 +{
 +	void *newp;
 +
 +	if (oldsize >= newsize)
 +		return (void *)p;
 +	newp = kvmalloc(newsize, flags);
 +	if (!newp)
 +		return NULL;
 +	memcpy(newp, p, oldsize);
 +	kvfree(p);
 +	return newp;
 +}
 +EXPORT_SYMBOL(kvrealloc);
 +
- static inline void *__page_rmapping(struct page *page)
- {
- 	unsigned long mapping;
- 
- 	mapping = (unsigned long)page->mapping;
- 	mapping &= ~PAGE_MAPPING_FLAGS;
- 
- 	return (void *)mapping;
- }
- 
  /* Neutral page->mapping pointer to address_space or anon_vma or other */
  void *page_rmapping(struct page *page)
  {

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

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

* Re: linux-next: manual merge of the folio tree with the xfs tree
  2021-08-11  7:42 linux-next: manual merge of the folio tree with the xfs tree Stephen Rothwell
@ 2021-08-11 14:43 ` Darrick J. Wong
  2021-08-11 14:44   ` Darrick J. Wong
  0 siblings, 1 reply; 3+ messages in thread
From: Darrick J. Wong @ 2021-08-11 14:43 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Matthew Wilcox, David Chinner, linux-xfs, Dave Chinner,
	Linux Kernel Mailing List, Linux Next Mailing List

On Wed, Aug 11, 2021 at 05:42:31PM +1000, Stephen Rothwell wrote:
> Hi all,
> 
> Today's linux-next merge of the folio tree got a conflict in:
> 
>   mm/util.c
> 
> between commit:
> 
>   de2860f46362 ("mm: Add kvrealloc()")
> 
> from the xfs tree and commit:
> 
>   3bc0556bade4 ("mm: Add folio_raw_mapping()")
> 
> from the folio tree.
> 
> I fixed it up (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.

Hmmm.  Seeing as krealloc lives in mm/slab_common.c anyway, I might just
move this function there, and (hopefully) avoid this conflict.

--D

> 
> -- 
> Cheers,
> Stephen Rothwell
> 
> diff --cc mm/util.c
> index d06e48b28eec,e8fa30e48447..000000000000
> --- a/mm/util.c
> +++ b/mm/util.c
> @@@ -660,31 -635,6 +660,21 @@@ void kvfree_sensitive(const void *addr
>   }
>   EXPORT_SYMBOL(kvfree_sensitive);
>   
>  +void *kvrealloc(const void *p, size_t oldsize, size_t newsize, gfp_t flags)
>  +{
>  +	void *newp;
>  +
>  +	if (oldsize >= newsize)
>  +		return (void *)p;
>  +	newp = kvmalloc(newsize, flags);
>  +	if (!newp)
>  +		return NULL;
>  +	memcpy(newp, p, oldsize);
>  +	kvfree(p);
>  +	return newp;
>  +}
>  +EXPORT_SYMBOL(kvrealloc);
>  +
> - static inline void *__page_rmapping(struct page *page)
> - {
> - 	unsigned long mapping;
> - 
> - 	mapping = (unsigned long)page->mapping;
> - 	mapping &= ~PAGE_MAPPING_FLAGS;
> - 
> - 	return (void *)mapping;
> - }
> - 
>   /* Neutral page->mapping pointer to address_space or anon_vma or other */
>   void *page_rmapping(struct page *page)
>   {



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

* Re: linux-next: manual merge of the folio tree with the xfs tree
  2021-08-11 14:43 ` Darrick J. Wong
@ 2021-08-11 14:44   ` Darrick J. Wong
  0 siblings, 0 replies; 3+ messages in thread
From: Darrick J. Wong @ 2021-08-11 14:44 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: Matthew Wilcox, David Chinner, linux-xfs, Dave Chinner,
	Linux Kernel Mailing List, Linux Next Mailing List

On Wed, Aug 11, 2021 at 07:43:45AM -0700, Darrick J. Wong wrote:
> On Wed, Aug 11, 2021 at 05:42:31PM +1000, Stephen Rothwell wrote:
> > Hi all,
> > 
> > Today's linux-next merge of the folio tree got a conflict in:
> > 
> >   mm/util.c
> > 
> > between commit:
> > 
> >   de2860f46362 ("mm: Add kvrealloc()")
> > 
> > from the xfs tree and commit:
> > 
> >   3bc0556bade4 ("mm: Add folio_raw_mapping()")
> > 
> > from the folio tree.
> > 
> > I fixed it up (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.
> 
> Hmmm.  Seeing as krealloc lives in mm/slab_common.c anyway, I might just
> move this function there, and (hopefully) avoid this conflict.

Never mind, didn't work.

--D

> 
> --D
> 
> > 
> > -- 
> > Cheers,
> > Stephen Rothwell
> > 
> > diff --cc mm/util.c
> > index d06e48b28eec,e8fa30e48447..000000000000
> > --- a/mm/util.c
> > +++ b/mm/util.c
> > @@@ -660,31 -635,6 +660,21 @@@ void kvfree_sensitive(const void *addr
> >   }
> >   EXPORT_SYMBOL(kvfree_sensitive);
> >   
> >  +void *kvrealloc(const void *p, size_t oldsize, size_t newsize, gfp_t flags)
> >  +{
> >  +	void *newp;
> >  +
> >  +	if (oldsize >= newsize)
> >  +		return (void *)p;
> >  +	newp = kvmalloc(newsize, flags);
> >  +	if (!newp)
> >  +		return NULL;
> >  +	memcpy(newp, p, oldsize);
> >  +	kvfree(p);
> >  +	return newp;
> >  +}
> >  +EXPORT_SYMBOL(kvrealloc);
> >  +
> > - static inline void *__page_rmapping(struct page *page)
> > - {
> > - 	unsigned long mapping;
> > - 
> > - 	mapping = (unsigned long)page->mapping;
> > - 	mapping &= ~PAGE_MAPPING_FLAGS;
> > - 
> > - 	return (void *)mapping;
> > - }
> > - 
> >   /* Neutral page->mapping pointer to address_space or anon_vma or other */
> >   void *page_rmapping(struct page *page)
> >   {
> 
> 

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

end of thread, other threads:[~2021-08-11 14:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-11  7:42 linux-next: manual merge of the folio tree with the xfs tree Stephen Rothwell
2021-08-11 14:43 ` Darrick J. Wong
2021-08-11 14:44   ` Darrick J. Wong

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.