From: kalpak Date: Tue, 13 Nov 2007 14:51:36 +0000 (+0000) Subject: b=13858 X-Git-Tag: v1_7_0_51~509 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=62a879ede4b51440913d3ff275db4af317d49dd4;p=fs%2Flustre-release.git b=13858 i=fanyong key may not be NULL terminated on HEAD, so change KEY_IS() macro to use strncmp() instead of strcmp. --- diff --git a/lustre/include/obd_support.h b/lustre/include/obd_support.h index a883129..469ded9 100644 --- a/lustre/include/obd_support.h +++ b/lustre/include/obd_support.h @@ -715,7 +715,7 @@ do { \ #define OBD_SLAB_FREE_PTR(ptr, slab) \ OBD_SLAB_FREE((ptr), (slab), sizeof *(ptr)) -#define KEY_IS(str) (keylen >= strlen(str) && strcmp(key, str) == 0) +#define KEY_IS(str) (keylen >= strlen(str) && strncmp(key, str, keylen) == 0) /* Wrapper for contiguous page frame allocation */ #define OBD_PAGES_ALLOC(ptr, order, gfp_mask) \