Whamcloud - gitweb
b=23728: gss: fix regression of rule removal.
authorEric Mei <eric.mei@oracle.com>
Tue, 21 Sep 2010 14:40:54 +0000 (18:40 +0400)
committerMikhail Pershin <tappro@sun.com>
Tue, 21 Sep 2010 15:04:53 +0000 (19:04 +0400)
lustre/mgs/mgs_llog.c
lustre/tests/test-framework.sh

index 1b99b6c..20469a8 100644 (file)
@@ -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);
index 84534a2..e3fb250 100644 (file)
@@ -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