From e224b50dffb0e0b7aeacb1ed1d664de8b0b5748a Mon Sep 17 00:00:00 2001 From: Eric Mei Date: Tue, 21 Sep 2010 18:40:54 +0400 Subject: [PATCH] b=23728: gss: fix regression of rule removal. --- lustre/mgs/mgs_llog.c | 24 ++++++++++-------------- lustre/tests/test-framework.sh | 2 +- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/lustre/mgs/mgs_llog.c b/lustre/mgs/mgs_llog.c index 1b99b6c..20469a8 100644 --- a/lustre/mgs/mgs_llog.c +++ b/lustre/mgs/mgs_llog.c @@ -2051,13 +2051,12 @@ static int mgs_srpc_set_param_disk(struct obd_device *obd, /* obsolete old one */ mgs_modify(obd, fsdb, mti, logname, mti->mti_svname, comment, CM_SKIP); - if (!mgs_param_empty(param)) { - /* write the new one */ - rc = mgs_write_log_direct(obd, fsdb, logname, lcfg, - mti->mti_svname, comment); - if (rc) - CERROR("err %d writing log %s\n", rc, logname); - } + /* write the new one */ + rc = mgs_write_log_direct(obd, fsdb, logname, lcfg, + mti->mti_svname, comment); + if (rc) + CERROR("err %d writing log %s\n", rc, logname); + out: name_destroy(&logname); out_lcfg: @@ -2193,7 +2192,7 @@ static int mgs_srpc_set_param(struct obd_device *obd, char *param) { char *copy; - int rc, copy_size, del; + int rc, copy_size; ENTRY; #ifndef HAVE_GSS @@ -2207,12 +2206,9 @@ static int mgs_srpc_set_param(struct obd_device *obd, return -ENOMEM; memcpy(copy, param, copy_size); - del = mgs_param_empty(param); - if (!del) { - rc = mgs_srpc_set_param_mem(fsdb, mti->mti_svname, param); - if (rc) - goto out_free; - } + rc = mgs_srpc_set_param_mem(fsdb, mti->mti_svname, param); + if (rc) + goto out_free; /* previous steps guaranteed the syntax is correct */ rc = mgs_srpc_set_param_disk(obd, fsdb, mti, copy); diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index 84534a2..e3fb250 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -4179,7 +4179,7 @@ restore_to_default_flavor() for rule in `do_facet mgs lctl get_param -n $proc 2>/dev/null | grep ".srpc.flavor."`; do echo "remove rule: $rule" spec=`echo $rule | awk -F = '{print $1}'` - do_facet mgs "$LCTL conf_param $spec=" + do_facet mgs "$LCTL conf_param -d $spec" done fi -- 1.8.3.1