[linux-cifs-client] [PATCH 2/4] CIFS fixes for 2.4.x
Sergey Vlasov
vsu at altlinux.ru
Thu Apr 8 15:48:19 GMT 2004
This patch sets sk->allocation for the cifs socket to GFP_NOFS, so
the internal memory allocations in the socket layer will not cause
attempts to reenter the cifs code for writeout of dirty pages.
I have not been able to reproduce a problem specifically related to
these allocations, however, this looks like the right way to avoid
reentrancy problems.
There was a commented out assignment to sk->allocation in smb_send()
(with a nonexistent GFP_BUFFER value) - I have deleted it and put
the setting to ipv4_connect() after the socket is created (it needs
to be done only once per socket).
--- kernel-source-cifs-1.0.2/connect.c.sock-alloc 2004-04-08 10:50:50 +0400
+++ kernel-source-cifs-1.0.2/connect.c 2004-04-08 12:54:18 +0400
@@ -798,6 +798,7 @@ ipv4_connect(struct sockaddr_in *psin_se
return rc;
} else {
/* BB other socket options to set KEEPALIVE, NODELAY? */
+ (*csocket)->sk->allocation = GFP_NOFS;
cFYI(1,("Socket created"));
}
}
--- kernel-source-cifs-1.0.2/transport.c.sock-alloc 2004-02-05 05:55:30 +0300
+++ kernel-source-cifs-1.0.2/transport.c 2004-04-08 12:54:35 +0400
@@ -127,7 +127,6 @@ smb_send(struct socket *ssocket, struct
if(ssocket == NULL)
return -ENOTSOCK; /* BB eventually add reconnect code here */
-/* ssocket->sk->allocation = GFP_BUFFER; *//* BB is this spurious? */
iov.iov_base = smb_buffer;
iov.iov_len = smb_buf_length + 4;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.samba.org/archive/linux-cifs-client/attachments/20040408/15cd2cce/attachment.bin
More information about the linux-cifs-client
mailing list