public inbox for linux-next@vger.kernel.org
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: Jens Axboe <axboe@kernel.dk>, Andrew Morton <akpm@linux-foundation.org>
Cc: David Howells <dhowells@redhat.com>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>,
	Lorenzo Stoakes <lstoakes@gmail.com>
Subject: linux-next: manual merge of the block tree with the mm tree
Date: Thu, 23 Mar 2023 10:02:04 +1100	[thread overview]
Message-ID: <20230323100204.0917cecf@canb.auug.org.au> (raw)

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

Hi all,

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

  lib/iov_iter.c

between commit:

  c4cf24ce34b7 ("iov_iter: add copy_page_to_iter_atomic()")

from the mm tree and commit:

  a53f5dee3448 ("iov_iter: Kill ITER_PIPE")

from the block 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 lib/iov_iter.c
index 48ca1c5dfc04,fad95e4cf372..000000000000
--- a/lib/iov_iter.c
+++ b/lib/iov_iter.c
@@@ -821,60 -532,6 +532,34 @@@ size_t copy_page_from_iter_atomic(struc
  }
  EXPORT_SYMBOL(copy_page_from_iter_atomic);
  
 +size_t copy_page_to_iter_atomic(struct page *page, unsigned offset, size_t bytes,
 +				struct iov_iter *i)
 +{
 +	char *kaddr = kmap_local_page(page);
 +	char *p = kaddr + offset;
 +	size_t copied = 0;
 +
 +	if (!page_copy_sane(page, offset, bytes) ||
 +	    WARN_ON_ONCE(i->data_source))
 +		goto out;
 +
 +	if (unlikely(iov_iter_is_pipe(i))) {
 +		copied = copy_page_to_iter_pipe(page, offset, bytes, i);
 +		goto out;
 +	}
 +
 +	iterate_and_advance(i, bytes, base, len, off,
 +		copyout(base, p + off, len),
 +		memcpy(base, p + off, len)
 +	)
 +	copied = bytes;
 +
 +out:
 +	kunmap_local(kaddr);
 +	return copied;
 +}
 +EXPORT_SYMBOL(copy_page_to_iter_atomic);
 +
- static void pipe_advance(struct iov_iter *i, size_t size)
- {
- 	struct pipe_inode_info *pipe = i->pipe;
- 	int off = i->last_offset;
- 
- 	if (!off && !size) {
- 		pipe_discard_from(pipe, i->start_head); // discard everything
- 		return;
- 	}
- 	i->count -= size;
- 	while (1) {
- 		struct pipe_buffer *buf = pipe_buf(pipe, i->head);
- 		if (off) /* make it relative to the beginning of buffer */
- 			size += abs(off) - buf->offset;
- 		if (size <= buf->len) {
- 			buf->len = size;
- 			i->last_offset = last_offset(buf);
- 			break;
- 		}
- 		size -= buf->len;
- 		i->head++;
- 		off = 0;
- 	}
- 	pipe_discard_from(pipe, i->head + 1); // discard everything past this one
- }
- 
  static void iov_iter_bvec_advance(struct iov_iter *i, size_t size)
  {
  	const struct bio_vec *bvec, *end;

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

             reply	other threads:[~2023-03-22 23:02 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-22 23:02 Stephen Rothwell [this message]
2023-03-22 23:13 ` linux-next: manual merge of the block tree with the mm tree David Howells
2023-03-22 23:15   ` Jens Axboe
2023-03-22 23:26     ` Andrew Morton
2023-03-23  0:03       ` Stephen Rothwell
2023-03-23  0:04       ` David Howells
2023-03-23  0:49       ` Jens Axboe
  -- strict thread matches above, loose matches on Subject: below --
2023-06-16  1:50 Stephen Rothwell
2023-06-16  1:58 Stephen Rothwell
2023-06-16  3:50 ` Andrew Morton
2023-06-16  9:56   ` David Howells
2023-06-16 16:07     ` Jens Axboe
2023-06-16 19:44 ` Vishal Moola
2024-02-14  0:25 Stephen Rothwell
2024-03-11 21:54 ` Stephen Rothwell
2024-04-02  0:27 Stephen Rothwell
2024-05-13 23:41 ` Stephen Rothwell
2024-05-13 23:43   ` Edgecombe, Rick P

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230323100204.0917cecf@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=akpm@linux-foundation.org \
    --cc=axboe@kernel.dk \
    --cc=dhowells@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=lstoakes@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox