diff mbox series

linux-next: build failure after merge of the block tree

Message ID 20201207140951.4c04f26f@canb.auug.org.au (mailing list archive)
State Not Applicable
Delegated to: Netdev Maintainers
Headers show
Series linux-next: build failure after merge of the block tree | expand

Checks

Context Check Description
netdev/tree_selection success Not a local patch

Commit Message

Stephen Rothwell Dec. 7, 2020, 3:09 a.m. UTC
Hi all,

After merging the block tree, today's linux-next build (powerpc
ppc64_defconfig) failed like this:

fs/io_uring.c: In function 'io_shutdown':
fs/io_uring.c:3782:9: error: too many arguments to function 'sock_from_file'
 3782 |  sock = sock_from_file(req->file, &ret);
      |         ^~~~~~~~~~~~~~
In file included from fs/io_uring.c:63:
include/linux/net.h:243:16: note: declared here
  243 | struct socket *sock_from_file(struct file *file);
      |                ^~~~~~~~~~~~~~

Caused by commit

  36f4fa6886a8 ("io_uring: add support for shutdown(2)")

interacting with commit

  dba4a9256bb4 ("net: Remove the err argument from sock_from_file")

from the bpf-next tree.

I have applied the following merge fix patch.

From: Stephen Rothwell <sfr@canb.auug.org.au>
Date: Mon, 7 Dec 2020 14:04:10 +1100
Subject: [PATCH] fixup for "net: Remove the err argument from sock_from_file"

Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
---
 fs/io_uring.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Florent Revest Dec. 7, 2020, 8:09 p.m. UTC | #1
On Mon, 2020-12-07 at 14:09 +1100, Stephen Rothwell wrote:
> Hi all,
> 
> After merging the block tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> fs/io_uring.c: In function 'io_shutdown':
> fs/io_uring.c:3782:9: error: too many arguments to function
> 'sock_from_file'
>  3782 |  sock = sock_from_file(req->file, &ret);
>       |         ^~~~~~~~~~~~~~
> In file included from fs/io_uring.c:63:
> include/linux/net.h:243:16: note: declared here
>   243 | struct socket *sock_from_file(struct file *file);
>       |                ^~~~~~~~~~~~~~
> 
> Caused by commit
> 
>   36f4fa6886a8 ("io_uring: add support for shutdown(2)")
> 
> interacting with commit
> 
>   dba4a9256bb4 ("net: Remove the err argument from sock_from_file")
> 
> from the bpf-next tree.
> 
> I have applied the following merge fix patch.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 7 Dec 2020 14:04:10 +1100
> Subject: [PATCH] fixup for "net: Remove the err argument from
> sock_from_file"
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  fs/io_uring.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/io_uring.c b/fs/io_uring.c
> index cd997264dbab..91d08408f1fe 100644
> --- a/fs/io_uring.c
> +++ b/fs/io_uring.c
> @@ -3779,9 +3779,9 @@ static int io_shutdown(struct io_kiocb *req,
> bool force_nonblock)
>  	if (force_nonblock)
>  		return -EAGAIN;
>  
> -	sock = sock_from_file(req->file, &ret);
> +	sock = sock_from_file(req->file);
>  	if (unlikely(!sock))
> -		return ret;
> +		return -ENOTSOCK;
>  
>  	ret = __sys_shutdown_sock(sock, req->shutdown.how);
>  	io_req_complete(req, ret);
> -- 
> 2.29.2


Thanks Stephen, this looks good to me.
Stephen Rothwell Dec. 14, 2020, 8:29 p.m. UTC | #2
Hi all,

On Mon, 7 Dec 2020 14:09:51 +1100 Stephen Rothwell <sfr@canb.auug.org.au> wrote:
>
> After merging the block tree, today's linux-next build (powerpc
> ppc64_defconfig) failed like this:
> 
> fs/io_uring.c: In function 'io_shutdown':
> fs/io_uring.c:3782:9: error: too many arguments to function 'sock_from_file'
>  3782 |  sock = sock_from_file(req->file, &ret);
>       |         ^~~~~~~~~~~~~~
> In file included from fs/io_uring.c:63:
> include/linux/net.h:243:16: note: declared here
>   243 | struct socket *sock_from_file(struct file *file);
>       |                ^~~~~~~~~~~~~~
> 
> Caused by commit
> 
>   36f4fa6886a8 ("io_uring: add support for shutdown(2)")
> 
> interacting with commit
> 
>   dba4a9256bb4 ("net: Remove the err argument from sock_from_file")
> 
> from the bpf-next tree.
> 
> I have applied the following merge fix patch.
> 
> From: Stephen Rothwell <sfr@canb.auug.org.au>
> Date: Mon, 7 Dec 2020 14:04:10 +1100
> Subject: [PATCH] fixup for "net: Remove the err argument from sock_from_file"
> 
> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
> ---
>  fs/io_uring.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/io_uring.c b/fs/io_uring.c
> index cd997264dbab..91d08408f1fe 100644
> --- a/fs/io_uring.c
> +++ b/fs/io_uring.c
> @@ -3779,9 +3779,9 @@ static int io_shutdown(struct io_kiocb *req, bool force_nonblock)
>  	if (force_nonblock)
>  		return -EAGAIN;
>  
> -	sock = sock_from_file(req->file, &ret);
> +	sock = sock_from_file(req->file);
>  	if (unlikely(!sock))
> -		return ret;
> +		return -ENOTSOCK;
>  
>  	ret = __sys_shutdown_sock(sock, req->shutdown.how);
>  	io_req_complete(req, ret);

Just a reminder that I am still applying this merge fix.
diff mbox series

Patch

diff --git a/fs/io_uring.c b/fs/io_uring.c
index cd997264dbab..91d08408f1fe 100644
--- a/fs/io_uring.c
+++ b/fs/io_uring.c
@@ -3779,9 +3779,9 @@  static int io_shutdown(struct io_kiocb *req, bool force_nonblock)
 	if (force_nonblock)
 		return -EAGAIN;
 
-	sock = sock_from_file(req->file, &ret);
+	sock = sock_from_file(req->file);
 	if (unlikely(!sock))
-		return ret;
+		return -ENOTSOCK;
 
 	ret = __sys_shutdown_sock(sock, req->shutdown.how);
 	io_req_complete(req, ret);