From 9cbb053ff764ccfd6cc9e30e55b9928aa75cce43 Mon Sep 17 00:00:00 2001 From: adilger Date: Wed, 8 Jun 2005 20:20:00 +0000 Subject: [PATCH] Branch b1_4 Move common KEY_IS() macro to header. --- lustre/include/linux/obd_support.h | 3 +++ lustre/lov/lov_obd.c | 4 ---- lustre/osc/osc_request.c | 3 --- 3 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lustre/include/linux/obd_support.h b/lustre/include/linux/obd_support.h index 9cb4ea8..98294db 100644 --- a/lustre/include/linux/obd_support.h +++ b/lustre/include/linux/obd_support.h @@ -455,4 +455,7 @@ do { \ (ptr) = (void *)0xdeadbeef; \ } while (0) +#define KEY_IS(str) \ + (keylen == strlen(str) && memcmp(key, str, keylen) == 0) + #endif diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index 5b8835a..9fd2370 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -2035,9 +2035,6 @@ static int lov_set_info(struct obd_export *exp, obd_count keylen, int i, rc = 0, err; ENTRY; -#define KEY_IS(str) \ - (keylen == strlen(str) && memcmp(key, str, keylen) == 0) - if (KEY_IS("next_id")) { if (vallen != lov->desc.ld_tgt_count) RETURN(-EINVAL); @@ -2083,7 +2080,6 @@ static int lov_set_info(struct obd_export *exp, obd_count keylen, rc = err; } RETURN(rc); -#undef KEY_IS } int lov_test_and_clear_async_rc(struct lov_stripe_md *lsm) diff --git a/lustre/osc/osc_request.c b/lustre/osc/osc_request.c index f0d67de..de285be 100644 --- a/lustre/osc/osc_request.c +++ b/lustre/osc/osc_request.c @@ -3067,9 +3067,6 @@ static int osc_set_info(struct obd_export *exp, obd_count keylen, char *bufs[1] = {key}; ENTRY; -#define KEY_IS(str) \ - (keylen == strlen(str) && memcmp(key, str, keylen) == 0) - OBD_FAIL_TIMEOUT(OBD_FAIL_OSC_SHUTDOWN, 10); if (KEY_IS("next_id")) { -- 1.8.3.1