Subject: linux-next: manual merge of the keys tree with Linus' tree

From: Stephen Rothwell <[email-masked]>
Date: Mon, 11 May 2020 14:59:15 +1000

Hi all,

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

  fs/splice.c

between commit:

  90da2e3f25c8 ("splice: move f_mode checks to do_{splice,tee}()")

from Linus' tree and commit:

  549d46d3827d ("pipe: Add general notification queue support")

from the keys 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 fs/splice.c
index fd0a1e7e5959,6e6ea30c72b4..000000000000
--- a/fs/splice.c
+++ b/fs/splice.c
@@@ -1118,12 -1118,8 +1118,12 @@@ long do_splice(struct file *in, loff_t 
  	loff_t offset;
  	long ret;
  
 +	if (unlikely(!(in->f_mode & FMODE_READ) ||
 +		     !(out->f_mode & FMODE_WRITE)))
 +		return -EBADF;
 +
- 	ipipe = get_pipe_info(in);
- 	opipe = get_pipe_info(out);
+ 	ipipe = get_pipe_info(in, true);
+ 	opipe = get_pipe_info(out, true);
  
  	if (ipipe && opipe) {
  		if (off_in || off_out)
@@@ -1757,14 -1766,10 +1757,17 @@@ static int link_pipe(struct pipe_inode_
  static long do_tee(struct file *in, struct file *out, size_t len,
  		   unsigned int flags)
  {
- 	struct pipe_inode_info *ipipe = get_pipe_info(in);
- 	struct pipe_inode_info *opipe = get_pipe_info(out);
 -	struct pipe_inode_info *ipipe = get_pipe_info(in, true);
 -	struct pipe_inode_info *opipe = get_pipe_info(out, true);
++	struct pipe_inode_info *ipipe;
++	struct pipe_inode_info *opipe;
  	int ret = -EINVAL;
  
 +	if (unlikely(!(in->f_mode & FMODE_READ) ||
 +		     !(out->f_mode & FMODE_WRITE)))
 +		return -EBADF;
 +
++	ipipe = get_pipe_info(in, true);
++	opipe = get_pipe_info(out, true);
++
  	/*
  	 * Duplicate the contents of ipipe to opipe without actually
  	 * copying the data.