[RHEL7,COMMIT] fuse kio: avoid spurious uncork setsockopt on unix socket

Submitted by Konstantin Khorenko on July 19, 2018, 10:22 a.m.

Details

Message ID 201807191022.w6JAM140015389@finist_ce7.work
State New
Series "fuse kio: avoid spurious uncork setsockopt on unix socket"
Headers show

Commit Message

Konstantin Khorenko July 19, 2018, 10:22 a.m.
The commit is pushed to "branch-rh7-3.10.0-862.6.3.vz7.62.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-862.6.3.vz7.62.4
------>
commit 79bdf2d2a0706b2364b9f1c9649ea593aef82b98
Author: Alexey Kuznetsov <kuznet@virtuozzo.com>
Date:   Thu Jul 19 13:22:01 2018 +0300

    fuse kio: avoid spurious uncork setsockopt on unix socket
    
    This even can affect performance, the error happens in data path
    
    Signed-off-by: Alexey Kuznetsov <kuznet@virtuozzo.com>
---
 fs/fuse/kio/pcs/pcs_sock_io.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/fs/fuse/kio/pcs/pcs_sock_io.c b/fs/fuse/kio/pcs/pcs_sock_io.c
index a1798a8c09fc..5443c11191ec 100644
--- a/fs/fuse/kio/pcs/pcs_sock_io.c
+++ b/fs/fuse/kio/pcs/pcs_sock_io.c
@@ -525,7 +525,7 @@  struct pcs_sockio * pcs_sockio_init(struct socket *sock,
 	sio->write_offset = 0;
 	sio->hdr_max = hdr_max;
 	sio->hdr_ptr = 0;
-	sio->flags = PCS_SOCK_F_CORK;
+	sio->flags = sock->sk->sk_family != AF_UNIX ? PCS_SOCK_F_CORK : 0;
 	sio->retrans = 0;
 
 	//// TODO:dmonakhov init ioconn here