staging/lustre/ldlm: Fix Multiple Assignments
authorNathaniel Clark <nathaniel.l.clark@intel.com>
Fri, 10 Jun 2016 02:35:13 +0000 (22:35 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 18 Jun 2016 03:32:34 +0000 (20:32 -0700)
Fix all multiple assignments on lustre/ldlm directory.

Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
Signed-off-by: Oleg Drokin <green@linuxhacker.ru>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/lustre/lustre/ldlm/ldlm_lib.c
drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c

index b4ffbe2fc4eda02032ae4baafc799a173dd180ab..b6a90b04828e43ba69bfc8e92a4d10e7de59777e 100644 (file)
@@ -345,7 +345,8 @@ int client_obd_setup(struct obd_device *obddev, struct lustre_cfg *lcfg)
         * Set cl_chksum* to CRC32 for now to avoid returning screwed info
         * through procfs.
         */
-       cli->cl_cksum_type = cli->cl_supp_cksum_types = OBD_CKSUM_CRC32;
+       cli->cl_cksum_type = OBD_CKSUM_CRC32;
+       cli->cl_supp_cksum_types = OBD_CKSUM_CRC32;
        atomic_set(&cli->cl_resends, OSC_DEFAULT_RESENDS);
 
        /* This value may be reduced at connect time in
index ab739f079a4872c437e777997eb42166e410c90e..3303ffabb17c783a4e42d4e35eb339ccd01f3e67 100644 (file)
@@ -1011,9 +1011,11 @@ static int ldlm_setup(void)
                blp->blp_min_threads = LDLM_NTHRS_INIT;
                blp->blp_max_threads = LDLM_NTHRS_MAX;
        } else {
-               blp->blp_min_threads = blp->blp_max_threads =
-                       min_t(int, LDLM_NTHRS_MAX, max_t(int, LDLM_NTHRS_INIT,
-                                                        ldlm_num_threads));
+               blp->blp_min_threads = min_t(int, LDLM_NTHRS_MAX,
+                                            max_t(int, LDLM_NTHRS_INIT,
+                                                  ldlm_num_threads));
+
+               blp->blp_max_threads = blp->blp_min_threads;
        }
 
        for (i = 0; i < blp->blp_min_threads; i++) {