* Re: [PATCH] staging: lustre use kernel socket sockopt apis
[not found] <1399085415-2910-1-git-send-email-fredrickprashanth@gmail.com>
@ 2014-06-22 17:42 ` Drokin, Oleg
0 siblings, 0 replies; only message in thread
From: Drokin, Oleg @ 2014-06-22 17:42 UTC (permalink / raw)
To: Fredrick John Berchmans
Cc: greg@kroah.com KH, Dilger, Andreas, Tao Peng,
hpdd-discuss@lists.01.org, linux-kernel@vger.kernel.org Kernel
So I came back to this patch (now part of Greg's tree)
On May 2, 2014, at 10:50 PM, Fredrick John Berchmans wrote:
> Change old way of ops->setsockopt or ops->getsockopt in kernel
> to kernel_setsockopt or kernel_getsockopt.
>
> --- a/drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c
> +++ b/drivers/staging/lustre/lustre/libcfs/linux/linux-tcpip.c
> @@ -56,21 +56,8 @@ libcfs_sock_ioctl(int cmd, unsigned long arg)
> CERROR ("Can't create socket: %d\n", rc);
> return rc;
> }
> -
> - sock_filp = sock_alloc_file(sock, 0, NULL);
> - if (IS_ERR(sock_filp)) {
> - sock_release(sock);
> - rc = PTR_ERR(sock_filp);
> - goto out;
> - }
> -
> - set_fs(KERNEL_DS);
> - if (sock_filp->f_op->unlocked_ioctl)
> - rc = sock_filp->f_op->unlocked_ioctl(sock_filp, cmd, arg);
> - set_fs(oldmm);
> -
> - fput(sock_filp);
> -out:
> + rc = kernel_sock_ioctl(sock, cmd, arg);
> + sock_release(sock);
> return rc;
> }
This part totally breaks lustre, we use this to also call things like SIOCGIFCONF that are not available from socket proto_ops because this is really coming from dev_ioctl and I do not see any better way to access it.
So I'd like this to be reverted or if there is a better way to access this, I am interested to learn it.
Bye,
Oleg
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2014-06-22 17:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <1399085415-2910-1-git-send-email-fredrickprashanth@gmail.com>
2014-06-22 17:42 ` [PATCH] staging: lustre use kernel socket sockopt apis Drokin, Oleg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®