* [PATCH] cifs: switch CIFSSMBQAllEAs to use memcmp
@ 2011-08-20 1:18 Jeff Layton
[not found] ` <1313803104-31810-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Layton @ 2011-08-20 1:18 UTC (permalink / raw)
To: smfrench-Re5JQEeQqe8AvxtiuMwx3w; +Cc: linux-cifs-u79uwXL29TY76Z2rM5mHXA
...as that's more efficient when we know that the lengths are equal.
Reported-by: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
Signed-off-by: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
---
fs/cifs/cifssmb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c
index f4d0988..7bac906 100644
--- a/fs/cifs/cifssmb.c
+++ b/fs/cifs/cifssmb.c
@@ -5849,7 +5849,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)
--
1.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread[parent not found: <1313803104-31810-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>]
* Re: [PATCH] cifs: switch CIFSSMBQAllEAs to use memcmp [not found] ` <1313803104-31810-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> @ 2011-08-24 6:34 ` Suresh Jayaraman 0 siblings, 0 replies; 2+ messages in thread From: Suresh Jayaraman @ 2011-08-24 6:34 UTC (permalink / raw) To: Jeff Layton Cc: smfrench-Re5JQEeQqe8AvxtiuMwx3w, linux-cifs-u79uwXL29TY76Z2rM5mHXA On 08/20/2011 06:48 AM, Jeff Layton wrote: > ...as that's more efficient when we know that the lengths are equal. > > Reported-by: David Howells <dhowells-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > Signed-off-by: Jeff Layton <jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> > --- > fs/cifs/cifssmb.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/fs/cifs/cifssmb.c b/fs/cifs/cifssmb.c > index f4d0988..7bac906 100644 > --- a/fs/cifs/cifssmb.c > +++ b/fs/cifs/cifssmb.c > @@ -5849,7 +5849,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) Looks good to me. Reviewed-by: Suresh Jayaraman <sjayaraman-l3A5Bk7waGM@public.gmane.org> We generally don't query for all EAs very often. Not sure whether how much it help improve efficiency. But, I do agree that memxxx variants are better when we know the length. -- Suresh Jayaraman ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-08-24 6:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-08-20 1:18 [PATCH] cifs: switch CIFSSMBQAllEAs to use memcmp Jeff Layton
[not found] ` <1313803104-31810-1-git-send-email-jlayton-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2011-08-24 6:34 ` Suresh Jayaraman
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.