aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJeff Layton <jlayton@poochiereds.net>2010-11-22 15:31:03 -0500
committerSteve French <sfrench@us.ibm.com>2010-12-06 17:45:19 -0500
commit884639996814585ef7079daa9e03a1eb562e235c (patch)
tree652d60d1716be67db2c21aaeaf643dc00d65e392 /fs
parent79df1baeec29022e4181f2964187b88661ef5517 (diff)
cifs: remove Local_System_Name
...this string is zeroed out and nothing ever changes it. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/cifs/cifsfs.c1
-rw-r--r--fs/cifs/cifsglob.h2
-rw-r--r--fs/cifs/connect.c23
3 files changed, 10 insertions, 16 deletions
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c
index 56a4b7544c3c..3936aa7f2c22 100644
--- a/fs/cifs/cifsfs.c
+++ b/fs/cifs/cifsfs.c
@@ -937,7 +937,6 @@ init_cifs(void)
937 GlobalCurrentXid = 0; 937 GlobalCurrentXid = 0;
938 GlobalTotalActiveXid = 0; 938 GlobalTotalActiveXid = 0;
939 GlobalMaxActiveXid = 0; 939 GlobalMaxActiveXid = 0;
940 memset(Local_System_Name, 0, 15);
941 spin_lock_init(&cifs_tcp_ses_lock); 940 spin_lock_init(&cifs_tcp_ses_lock);
942 spin_lock_init(&cifs_file_list_lock); 941 spin_lock_init(&cifs_file_list_lock);
943 spin_lock_init(&GlobalMid_Lock); 942 spin_lock_init(&GlobalMid_Lock);
diff --git a/fs/cifs/cifsglob.h b/fs/cifs/cifsglob.h
index 94ccfacaed8a..7136c0c3e2f9 100644
--- a/fs/cifs/cifsglob.h
+++ b/fs/cifs/cifsglob.h
@@ -756,8 +756,6 @@ GLOBAL_EXTERN unsigned int GlobalTotalActiveXid; /* prot by GlobalMid_Sem */
756GLOBAL_EXTERN unsigned int GlobalMaxActiveXid; /* prot by GlobalMid_Sem */ 756GLOBAL_EXTERN unsigned int GlobalMaxActiveXid; /* prot by GlobalMid_Sem */
757GLOBAL_EXTERN spinlock_t GlobalMid_Lock; /* protects above & list operations */ 757GLOBAL_EXTERN spinlock_t GlobalMid_Lock; /* protects above & list operations */
758 /* on midQ entries */ 758 /* on midQ entries */
759GLOBAL_EXTERN char Local_System_Name[15];
760
761/* 759/*
762 * Global counters, updated atomically 760 * Global counters, updated atomically
763 */ 761 */
diff --git a/fs/cifs/connect.c b/fs/cifs/connect.c
index bb17ee2ba782..53f9c31a52b2 100644
--- a/fs/cifs/connect.c
+++ b/fs/cifs/connect.c
@@ -807,23 +807,20 @@ cifs_parse_mount_options(char *options, const char *devname,
807 short int override_gid = -1; 807 short int override_gid = -1;
808 bool uid_specified = false; 808 bool uid_specified = false;
809 bool gid_specified = false; 809 bool gid_specified = false;
810 char *nodename = utsname()->nodename;
810 811
811 separator[0] = ','; 812 separator[0] = ',';
812 separator[1] = 0; 813 separator[1] = 0;
813 814
814 if (Local_System_Name[0] != 0) 815 /*
815 memcpy(vol->source_rfc1001_name, Local_System_Name, 15); 816 * does not have to be perfect mapping since field is
816 else { 817 * informational, only used for servers that do not support
817 char *nodename = utsname()->nodename; 818 * port 445 and it can be overridden at mount time
818 int n = strnlen(nodename, 15); 819 */
819 memset(vol->source_rfc1001_name, 0x20, 15); 820 memset(vol->source_rfc1001_name, 0x20, 15);
820 for (i = 0; i < n; i++) { 821 for (i = 0; i < strnlen(nodename, 15); i++)
821 /* does not have to be perfect mapping since field is 822 vol->source_rfc1001_name[i] = toupper(nodename[i]);
822 informational, only used for servers that do not support 823
823 port 445 and it can be overridden at mount time */
824 vol->source_rfc1001_name[i] = toupper(nodename[i]);
825 }
826 }
827 vol->source_rfc1001_name[15] = 0; 824 vol->source_rfc1001_name[15] = 0;
828 /* null target name indicates to use *SMBSERVR default called name 825 /* null target name indicates to use *SMBSERVR default called name
829 if we end up sending RFC1001 session initialize */ 826 if we end up sending RFC1001 session initialize */