Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 326290
b: refs/heads/master
c: b8eed28
h: refs/heads/master
v: v3
  • Loading branch information
Jeff Layton authored and Steve French committed Sep 25, 2012
1 parent 92efa01 commit 7496a9e
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 6f49f46b187df34539f1e5df2469b8a541897700
refs/heads/master: b8eed28375a43e1c9aaa9d15af2a052aae0d0725
4 changes: 4 additions & 0 deletions trunk/fs/cifs/connect.c
Original file line number Diff line number Diff line change
Expand Up @@ -1680,6 +1680,10 @@ cifs_parse_mount_options(const char *mountdata, const char *devname,
if (string == NULL)
goto out_nomem;

/*
* FIXME: since we now cork/uncork the socket while
* sending, should we deprecate this option?
*/
if (strnicmp(string, "TCP_NODELAY", 11) == 0)
vol->sockopt_tcp_nodelay = 1;
break;
Expand Down
12 changes: 12 additions & 0 deletions trunk/fs/cifs/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
#include <linux/net.h>
#include <linux/delay.h>
#include <linux/freezer.h>
#include <linux/tcp.h>
#include <asm/uaccess.h>
#include <asm/processor.h>
#include <linux/mempool.h>
Expand Down Expand Up @@ -247,12 +248,23 @@ smb_send_rqst(struct TCP_Server_Info *server, struct smb_rqst *rqst)
int n_vec = rqst->rq_nvec;
unsigned int smb_buf_length = get_rfc1002_length(iov[0].iov_base);
size_t total_len;
struct socket *ssocket = server->ssocket;
int val = 1;

cFYI(1, "Sending smb: smb_len=%u", smb_buf_length);
dump_smb(iov[0].iov_base, iov[0].iov_len);

/* cork the socket */
kernel_setsockopt(ssocket, SOL_TCP, TCP_CORK,
(char *)&val, sizeof(val));

rc = smb_send_kvec(server, iov, n_vec, &total_len);

/* uncork it */
val = 0;
kernel_setsockopt(ssocket, SOL_TCP, TCP_CORK,
(char *)&val, sizeof(val));

if ((total_len > 0) && (total_len != smb_buf_length + 4)) {
cFYI(1, "partial send (wanted=%u sent=%zu): terminating "
"session", smb_buf_length + 4, total_len);
Expand Down

0 comments on commit 7496a9e

Please sign in to comment.