Whamcloud - gitweb
LU-4118 kernel: kernel update [RHEL6.4 2.6.32-358.23.2.el6]
[fs/lustre-release.git] / lustre / ofd / lproc_ofd.c
index b7bb64f..e11a81b 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, Intel Corporation.
+ * Copyright (c) 2012, 2013, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -148,9 +148,10 @@ static int lprocfs_ofd_rd_precreate_batch(char *page, char **start, off_t off,
                                          int count, int *eof, void *data)
 {
        struct obd_device *obd = (struct obd_device *)data;
-       struct ofd_device *ofd = ofd_dev(obd->obd_lu_dev);
+       struct ofd_device *ofd;
 
        LASSERT(obd != NULL);
+       ofd = ofd_dev(obd->obd_lu_dev);
        *eof = 1;
        return snprintf(page, count, "%d\n", ofd->ofd_precreate_batch);
 }
@@ -248,7 +249,7 @@ int lprocfs_ofd_rd_fmd_max_age(char *page, char **start, off_t off,
        struct ofd_device       *ofd = ofd_dev(obd->obd_lu_dev);
        int                      rc;
 
-       rc = snprintf(page, count, "%ld\n", ofd->ofd_fmd_max_age / CFS_HZ);
+       rc = snprintf(page, count, "%ld\n", ofd->ofd_fmd_max_age / HZ);
        return rc;
 }
 
@@ -267,7 +268,7 @@ int lprocfs_ofd_wr_fmd_max_age(struct file *file, const char *buffer,
        if (val > 65536 || val < 1)
                return -EINVAL;
 
-       ofd->ofd_fmd_max_age = val * CFS_HZ;
+       ofd->ofd_fmd_max_age = val * HZ;
        return count;
 }