Whamcloud - gitweb
LU-3974 llite: fix mkdir endless loop
[fs/lustre-release.git] / lustre / obdclass / llog_test.c
index 56fab6a..b41ab6f 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2011, 2012, Intel, Inc.
+ * Copyright (c) 2012, 2013, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -433,7 +433,7 @@ static int cat_print_cb(const struct lu_env *env, struct llog_handle *llh,
                        struct llog_rec_hdr *rec, void *data)
 {
        struct llog_logid_rec   *lir = (struct llog_logid_rec *)rec;
-       struct lu_fid            fid;
+       struct lu_fid            fid = {0};
 
        if (rec->lrh_type != LLOG_LOGID_MAGIC) {
                CERROR("invalid record in catalog\n");
@@ -456,7 +456,7 @@ static int plain_counter;
 static int plain_print_cb(const struct lu_env *env, struct llog_handle *llh,
                          struct llog_rec_hdr *rec, void *data)
 {
-       struct lu_fid fid;
+       struct lu_fid fid = {0};
 
        if (!(llh->lgh_hdr->llh_flags & LLOG_F_IS_PLAIN)) {
                CERROR("log is not plain\n");
@@ -703,7 +703,7 @@ static union {
 static int test_7_print_cb(const struct lu_env *env, struct llog_handle *llh,
                           struct llog_rec_hdr *rec, void *data)
 {
-       struct lu_fid fid;
+       struct lu_fid fid = {0};
 
        logid_to_fid(&llh->lgh_id, &fid);
 
@@ -1017,10 +1017,10 @@ static int llog_test_setup(struct obd_device *obd, struct lustre_cfg *lcfg)
        if (rc)
                RETURN(rc);
 
-       rc = lu_context_init(&test_session, LCT_SESSION);
+       rc = lu_context_init(&test_session, LCT_SERVER_SESSION);
        if (rc)
                GOTO(cleanup_env, rc);
-       test_session.lc_thread = (struct ptlrpc_thread *)cfs_current();
+       test_session.lc_thread = (struct ptlrpc_thread *)current;
        lu_context_enter(&test_session);
        env.le_ses = &test_session;