cifs: add mount parameter tcpnodelay
[linux-2.6-microblaze.git] / fs / cifs / fs_context.c
index 4130908..38d96a4 100644 (file)
@@ -116,6 +116,7 @@ const struct fs_parameter_spec smb3_fs_parameters[] = {
        fsparam_flag("nosharesock", Opt_nosharesock),
        fsparam_flag_no("persistenthandles", Opt_persistent),
        fsparam_flag_no("resilienthandles", Opt_resilient),
+       fsparam_flag_no("tcpnodelay", Opt_tcp_nodelay),
        fsparam_flag("domainauto", Opt_domainauto),
        fsparam_flag("rdma", Opt_rdma),
        fsparam_flag("modesid", Opt_modesid),
@@ -1389,6 +1390,13 @@ static int smb3_fs_context_parse_param(struct fs_context *fc,
                        }
                }
                break;
+       case Opt_tcp_nodelay:
+               /* tcp nodelay should not usually be needed since we CORK/UNCORK the socket */
+               if (result.negated)
+                       ctx->sockopt_tcp_nodelay = false;
+               else
+                       ctx->sockopt_tcp_nodelay = true;
+               break;
        case Opt_domainauto:
                ctx->domainauto = true;
                break;