aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/connect.c
diff options
context:
space:
mode:
authorSteve French <smfrench@gmail.com>2013-07-04 11:35:21 -0400
committerSteve French <smfrench@gmail.com>2013-07-04 15:38:08 -0400
commit95dc8dd14e2e84cc3adabc8310768c13758e7d96 (patch)
treea0c0bb7bd46fd3d527011bb14b53972decf6a818 /fs/cifs/connect.c
parent80cc38b16389849a6e06441ace4530f6b2497c3c (diff)
Limit allocation of crypto mechanisms to dialect which requires
Updated patch to try to prevent allocation of cifs, smb2 or smb3 crypto secmech structures unless needed. Currently cifs allocates all crypto mechanisms when the first session is established (4 functions and 4 contexts), rather than only allocating these when needed (smb3 needs two, the rest of the dialects only need one). Acked-by: Jeff Layton <jlayton@redhat.com> Reviewed-by: Shirish Pargaonkar <shirishpargaonkar@gmail.com> Signed-off-by: Steve French <smfrench@gmail.com>
Diffstat (limited to 'fs/cifs/connect.c')
-rw-r--r--fs/cifs/connect.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index afcb8a1a33b7..fa68813396b5 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -2108,12 +2108,6 @@ cifs_get_tcp_session(struct smb_vol *volume_info)
2108 goto out_err; 2108 goto out_err;
2109 } 2109 }
2110 2110
2111 rc = cifs_crypto_shash_allocate(tcp_ses);
2112 if (rc) {
2113 cifs_dbg(VFS, "could not setup hash structures rc %d\n", rc);
2114 goto out_err;
2115 }
2116
2117 tcp_ses->ops = volume_info->ops; 2111 tcp_ses->ops = volume_info->ops;
2118 tcp_ses->vals = volume_info->vals; 2112 tcp_ses->vals = volume_info->vals;
2119 cifs_set_net_ns(tcp_ses, get_net(current->nsproxy->net_ns)); 2113 cifs_set_net_ns(tcp_ses, get_net(current->nsproxy->net_ns));