Whamcloud - gitweb
Revert "LU-2800 autoconf: remove LC_PROCFS_USERS test"
[fs/lustre-release.git] / lustre / quota / lproc_quota.c
index 0d5e710..38f3bb2 100644 (file)
@@ -21,7 +21,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2012 Intel, Inc.
+ * Copyright (c) 2011, 2013, Intel Corporation.
  * Use is subject to license terms.
  *
  * Author: Johann Lombardi <johann.lombardi@intel.com>
@@ -34,8 +34,6 @@
 #include <lprocfs_status.h>
 #include <obd.h>
 #include <linux/seq_file.h>
-#include <lustre_fsfilt.h>
-
 #include "lquota_internal.h"
 
 #ifdef LPROCFS
@@ -272,8 +270,13 @@ static int lprocfs_quota_seq_open(struct inode *inode, struct file *file)
        /* Initialize the common environment to be used in the seq operations */
        rc = lu_env_init(&lqp->lqp_env, LCT_LOCAL);
        if (rc) {
+               char *obd_name = "quota";
+
+               if (lqp->lqp_obj != NULL)
+                       obd_name = lqp->lqp_obj->do_lu.lo_dev->ld_obd->obd_name;
+
                CERROR("%s: error initializing procfs quota env: rc = %d\n",
-                      lqp->lqp_obj->do_lu.lo_dev->ld_obd->obd_name, rc);
+                      obd_name, rc);
                goto out_lqp;
        }