Whamcloud - gitweb
LU-1347 build: remove the vim/emacs modelines
[fs/lustre-release.git] / lustre / ptlrpc / llog_server.c
index db59ddc..80f67a8 100644 (file)
@@ -1,6 +1,4 @@
-/* -*- mode: c; c-basic-offset: 8; indent-tabs-mode: nil; -*-
- * vim:expandtab:shiftwidth=8:tabstop=8:
- *
+/*
  * GPL HEADER START
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -28,6 +26,8 @@
 /*
  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
+ *
+ * Copyright (c) 2011, Whamcloud, Inc.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -127,7 +127,6 @@ int llog_origin_handle_destroy(struct ptlrpc_request *req)
         struct lvfs_run_ctxt  saved;
         struct llog_logid    *logid = NULL;
         struct llog_ctxt     *ctxt;
-        __u32                 flags;
         int                   rc;
         ENTRY;
 
@@ -155,7 +154,6 @@ int llog_origin_handle_destroy(struct ptlrpc_request *req)
 
         body = req_capsule_server_get(&req->rq_pill, &RMF_LLOGD_BODY);
         body->lgd_logid = loghandle->lgh_id;
-        flags = body->lgd_llh_flags;
         rc = llog_init_handle(loghandle, LLOG_F_IS_PLAIN, NULL);
         if (rc)
                 GOTO(out_close, rc);
@@ -528,7 +526,7 @@ static int llog_catinfo_cb(struct llog_handle *cat,
         static char *out = NULL;
         static int remains = 0;
         struct llog_ctxt *ctxt = NULL;
-        struct llog_handle *handle;
+        struct llog_handle *handle = NULL;
         struct llog_logid *logid;
         struct llog_logid_rec *lir;
         int l, rc, index, count = 0;
@@ -601,11 +599,11 @@ static int llog_catinfo_deletions(struct obd_device *obd, char *buf,
         count = mds->mds_lov_desc.ld_tgt_count;
         size = sizeof(*idarray) * count;
 
-        OBD_VMALLOC(idarray, size);
+        OBD_ALLOC_LARGE(idarray, size);
         if (!idarray)
                 GOTO(release_ctxt, rc = -ENOMEM);
 
-        cfs_mutex_down(&obd->obd_olg.olg_cat_processing);
+        cfs_mutex_lock(&obd->obd_olg.olg_cat_processing);
         rc = llog_get_cat_list(obd, name, 0, count, idarray);
         if (rc)
                 GOTO(out_free, rc);
@@ -651,8 +649,8 @@ static int llog_catinfo_deletions(struct obd_device *obd, char *buf,
 out_pop:
         pop_ctxt(&saved, &ctxt->loc_exp->exp_obd->obd_lvfs_ctxt, NULL);
 out_free:
-        cfs_mutex_up(&obd->obd_olg.olg_cat_processing);
-        OBD_VFREE(idarray, size);
+        cfs_mutex_unlock(&obd->obd_olg.olg_cat_processing);
+        OBD_FREE_LARGE(idarray, size);
 release_ctxt:
         llog_ctxt_put(ctxt);
         return rc;