Whamcloud - gitweb
LU-409 stop loading the llite_lloop module for >= 2.6.32 kernels
[fs/lustre-release.git] / lustre / lvfs / upcall_cache.c
index 8894557..6ad44b2 100644 (file)
@@ -112,7 +112,7 @@ static struct upcall_cache_entry *alloc_entry(__u64 key)
 static void free_entry(struct upcall_cache_entry *entry)
 {
         if (entry->ue_group_info)
-                groups_free(entry->ue_group_info);
+                put_group_info(entry->ue_group_info);
         list_del(&entry->ue_hash);
         CDEBUG(D_OTHER, "destroy cache entry %p for key "LPU64"\n",
                entry, entry->ue_key);
@@ -216,7 +216,7 @@ static int entry_set_group_info(struct upcall_cache_entry *entry, __u32 primary,
         entry->ue_primary = primary;
 
         for (i = 0; i < ginfo->nblocks; i++) {
-                int cp_count = min(NGROUPS_PER_BLOCK, (int)ngroups);
+                int cp_count = min_t(int, NGROUPS_PER_BLOCK, ngroups);
                 int off = i * NGROUPS_PER_BLOCK;
 
                 for (j = 0; j < cp_count; j++)