Explorar o código

[CIFS] fix SetEA failure to some Samba versions

Thanks to Oleg Gvozdev for noticing the problem.

CC: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Steve French <sfrench@us.ibm.com>
Steve French %!s(int64=17) %!d(string=hai) anos
pai
achega
dae5dbdbd7
Modificáronse 2 ficheiros con 2 adicións e 2 borrados
  1. 1 1
      fs/cifs/CHANGES
  2. 1 1
      fs/cifs/cifssmb.c

+ 1 - 1
fs/cifs/CHANGES

@@ -3,7 +3,7 @@ Version 1.52
 Fix oops on second mount to server when null auth is used.
 Fix oops on second mount to server when null auth is used.
 Enable experimental Kerberos support.  Return writebehind errors on flush
 Enable experimental Kerberos support.  Return writebehind errors on flush
 and sync so that events like out of disk space get reported properly on
 and sync so that events like out of disk space get reported properly on
-cached files.
+cached files. Fix setxattr failure to certain Samba versions.
 
 
 Version 1.51
 Version 1.51
 ------------
 ------------

+ 1 - 1
fs/cifs/cifssmb.c

@@ -5499,7 +5499,7 @@ SetEARetry:
 	else
 	else
 		name_len = strnlen(ea_name, 255);
 		name_len = strnlen(ea_name, 255);
 
 
-	count = sizeof(*parm_data) + ea_value_len + name_len + 1;
+	count = sizeof(*parm_data) + ea_value_len + name_len;
 	pSMB->MaxParameterCount = cpu_to_le16(2);
 	pSMB->MaxParameterCount = cpu_to_le16(2);
 	pSMB->MaxDataCount = cpu_to_le16(1000);	/* BB find max SMB size from sess */
 	pSMB->MaxDataCount = cpu_to_le16(1000);	/* BB find max SMB size from sess */
 	pSMB->MaxSetupCount = 0;
 	pSMB->MaxSetupCount = 0;