linux-next: build failure after merge of the net-next tree
Hi all,
After merging the net-next tree, today's linux-next build (x86_64 allmodconfig) failed like this:
net/smc/af_smc.c: In function 'smc_splice_read':net/smc/af_smc.c:1258:39: error: passing argument 1 of 'smc->clcsock->ops->splice_read' from incompatible pointer type [-Werror=incompatible-pointer-types]
rc = smc->clcsock->ops->splice_read(smc->clcsock, ppos,
^
net/smc/af_smc.c:1258:39: note: expected 'struct file *' but argument is of type 'struct socket *' net/smc/af_smc.c: At top level:net/smc/af_smc.c:1288:17: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.splice_read = smc_splice_read,
^
net/smc/af_smc.c:1288:17: note: (near initialization for 'smc_sock_ops.splice_read')
Caused by commit
ac7138746e14 ("smc: establish new socket family")
interacting with commit
15a8f657c71d ("switch socket ->splice_read() to struct file *")
from the vfs tree.
I applied the following merge fix patch which could well be incorrect ...
From: Stephen Rothwell <[email protected]>
Date: Tue, 10 Jan 2017 10:52:38 +1100
Subject: [PATCH] smc: merge fix for "switch socket ->splice_read() to struct file *"
--- net/smc/af_smc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
net/smc/af_smc.c +3 -2
@@ -1242,10 +1242,11 @@ static ssize_t smc_sendpage(struct socket *sock, struct page *page,return rc; } -static ssize_t smc_splice_read (struct socket *sock,loff_t *ppos, +static ssize_t smc_splice_read (struct file *file,loff_t *ppos,struct pipe_inode_info *pipe,size_t len,unsigned int flags) { +struct socket *sock = file->private_data;struct sock *sk = sock->sk;struct smc_sock *smc;int rc = -ENOTCONN ;
@@ -1255,7 +1256,7 @@ static ssize_t smc_splice_read(struct socket *sock, loff_t *ppos,if ((sk->sk_state !=SMC_ACTIVE ) && (sk->sk_state !=SMC_CLOSED )) goto out;if (smc->use_fallback) { - rc = smc->clcsock->ops->splice_read (smc->clcsock, ppos, + rc = smc->clcsock->ops->splice_read (file, ppos, pipe, len, flags); }else { rc = -EOPNOTSUPP ;
Signature · 5 lines
2.10.2 -- Cheers, Stephen Rothwell
ACK - smc_splice_read() is just a place holder at the moment. Its implementation for AF_SMC will follow.
Regards, Ursula Braun
Quoted 64 lines · Stephen Rothwell
Hi all,
After merging the net-next tree, today's linux-next build (
x86_64allmodconfig) failed like this:
net/smc/af_smc.c: In function 'smc_splice_read':net/smc/af_smc.c:1258:39: error: passing argument 1 of 'smc->clcsock->ops->splice_read' from incompatible pointer type [-Werror=incompatible-pointer-types]
rc = smc->clcsock->ops->splice_read(smc->clcsock, ppos,^
net/smc/af_smc.c:1258:39: note: expected 'struct file *' but argument is of type 'struct socket *'net/smc/af_smc.c: At top level:net/smc/af_smc.c:1288:17: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.splice_read =smc_splice_read,^
net/smc/af_smc.c:1288:17: note: (near initialization for 'smc_sock_ops.splice_read')Caused by commit
ac7138746e14("smc: establish new socket family")interacting with commit
15a8f657c71d("switch socket ->splice_read() to struct file *")from the vfs tree.
I applied the following merge fix patch which could well be incorrect ...
From: Stephen Rothwell <[email protected]>
Date: Tue, 10 Jan 2017 10:52:38 +1100
Subject: [PATCH] smc: merge fix for "switch socket ->splice_read() to struct file *"Signed-off-by Stephen Rothwell <[email protected]>--- net/smc/af_smc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)net/smc/af_smc.c +3
-2@@ -1242,10 +1242,11 @@ static ssize_t smc_sendpage(struct socket *sock, struct page *page,return rc; } -static ssize_t smc_splice_read (struct socket *sock,loff_t *ppos, +static ssize_t smc_splice_read (struct file *file,loff_t *ppos,struct pipe_inode_info *pipe,size_t len,unsigned int flags) { +struct socket *sock = file->private_data;struct sock *sk = sock->sk;struct smc_sock *smc;int rc = -ENOTCONN ;@@ -1255,7 +1256,7 @@ static ssize_t smc_splice_read(struct socket *sock, loff_t *ppos,if ((sk->sk_state !=SMC_ACTIVE ) && (sk->sk_state !=SMC_CLOSED )) goto out;if (smc->use_fallback) { - rc = smc->clcsock->ops->splice_read (smc->clcsock, ppos, + rc = smc->clcsock->ops->splice_read (file, ppos, pipe, len, flags); }else { rc = -EOPNOTSUPP ;
Hi all,
Quoted 64 lines · On Tue, 10 Jan 2017 10:59:27 +1100 Stephen Rothwell <[email protected]>…
After merging the net-next tree, today's linux-next build (
x86_64allmodconfig) failed like this:
net/smc/af_smc.c: In function 'smc_splice_read':net/smc/af_smc.c:1258:39: error: passing argument 1 of 'smc->clcsock->ops->splice_read' from incompatible pointer type [-Werror=incompatible-pointer-types]
rc = smc->clcsock->ops->splice_read(smc->clcsock, ppos,^
net/smc/af_smc.c:1258:39: note: expected 'struct file *' but argument is of type 'struct socket *'net/smc/af_smc.c: At top level:net/smc/af_smc.c:1288:17: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.splice_read =smc_splice_read,^
net/smc/af_smc.c:1288:17: note: (near initialization for 'smc_sock_ops.splice_read')Caused by commit
ac7138746e14("smc: establish new socket family")interacting with commit
15a8f657c71d("switch socket ->splice_read() to struct file *")from the vfs tree.
I applied the following merge fix patch which could well be incorrect ...
From: Stephen Rothwell <[email protected]>
Date: Tue, 10 Jan 2017 10:52:38 +1100
Subject: [PATCH] smc: merge fix for "switch socket ->splice_read() to struct file *"Signed-off-by Stephen Rothwell <[email protected]>--- net/smc/af_smc.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)net/smc/af_smc.c +3
-2@@ -1242,10 +1242,11 @@ static ssize_t smc_sendpage(struct socket *sock, struct page *page,return rc; } -static ssize_t smc_splice_read (struct socket *sock,loff_t *ppos, +static ssize_t smc_splice_read (struct file *file,loff_t *ppos,struct pipe_inode_info *pipe,size_t len,unsigned int flags) { +struct socket *sock = file->private_data;struct sock *sk = sock->sk;struct smc_sock *smc;int rc = -ENOTCONN ;@@ -1255,7 +1256,7 @@ static ssize_t smc_splice_read(struct socket *sock, loff_t *ppos,if ((sk->sk_state !=SMC_ACTIVE ) && (sk->sk_state !=SMC_CLOSED )) goto out;if (smc->use_fallback) { - rc = smc->clcsock->ops->splice_read (smc->clcsock, ppos, + rc = smc->clcsock->ops->splice_read (file, ppos, pipe, len, flags); }else { rc = -EOPNOTSUPP ;Signature · 1 line
2.10.2
This fix up is now needed when the vfs tree is merged with Linus' tree.
Signature · 2 lines
Cheers, Stephen Rothwell