Whamcloud - gitweb
LU-3088 build: fix 'resource leak' errors
[fs/lustre-release.git] / lustre / ldlm / ldlm_pool.c
index beba888..d724a2d 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2012, Whamcloud, Inc.
+ * Copyright (c) 2010, 2012, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -518,8 +518,8 @@ static int ldlm_cli_pool_recalc(struct ldlm_pool *pl)
          * It may be called when SLV has changed much, this is why we do not
          * take into account pl->pl_recalc_time here.
          */
-        RETURN(ldlm_cancel_lru(ldlm_pl2ns(pl), 0, LDLM_SYNC, 
-                               LDLM_CANCEL_LRUR));
+       RETURN(ldlm_cancel_lru(ldlm_pl2ns(pl), 0, LCF_ASYNC,
+                              LDLM_CANCEL_LRUR));
 }
 
 /**
@@ -551,8 +551,8 @@ static int ldlm_cli_pool_shrink(struct ldlm_pool *pl,
        spin_unlock(&ns->ns_lock);
 
         if (nr) {
-                canceled = ldlm_cancel_lru(ns, nr, LDLM_ASYNC,
-                                           LDLM_CANCEL_SHRINK);
+               canceled = ldlm_cancel_lru(ns, nr, LCF_ASYNC,
+                                          LDLM_CANCEL_SHRINK);
         }
 #ifdef __KERNEL__
         /*
@@ -845,7 +845,7 @@ static int ldlm_pool_proc_init(struct ldlm_pool *pl)
         lprocfs_counter_init(pl->pl_stats, LDLM_POOL_TIMING_STAT,
                              LPROCFS_CNTR_AVGMINMAX | LPROCFS_CNTR_STDDEV,
                              "recalc_timing", "sec");
-        lprocfs_register_stats(pl->pl_proc_dir, "stats", pl->pl_stats);
+       rc = lprocfs_register_stats(pl->pl_proc_dir, "stats", pl->pl_stats);
 
         EXIT;
 out_free_name: