瀏覽代碼

cifs: switch CIFSSMBQAllEAs to use memcmp

...as that's more efficient when we know that the lengths are equal.

Reported-by: David Howells <dhowells@redhat.com>
Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Steve French <smfrench@gmail.com>
Jeff Layton 13 年之前
父節點
當前提交
ac423446d8
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/cifs/cifssmb.c

+ 1 - 1
fs/cifs/cifssmb.c

@@ -5840,7 +5840,7 @@ QAllEAsRetry:
 
 		if (ea_name) {
 			if (ea_name_len == name_len &&
-			    strncmp(ea_name, temp_ptr, name_len) == 0) {
+			    memcmp(ea_name, temp_ptr, name_len) == 0) {
 				temp_ptr += name_len + 1;
 				rc = value_len;
 				if (buf_size == 0)