Whamcloud - gitweb
LU-14833 sec: quiet spurious gss_init_svc_upcall() message
[fs/lustre-release.git] / lustre / mdt / mdt_fs.c
index 4710c30..262cabe 100644 (file)
  *
  * You should have received a copy of the GNU General Public License
  * version 2 along with this program; If not, see
- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf
- *
- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * http://www.gnu.org/licenses/gpl-2.0.html
  *
  * GPL HEADER END
  */
@@ -31,7 +27,6 @@
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
- * Lustre is a trademark of Sun Microsystems, Inc.
  *
  * lustre/mdt/mdt_fs.c
  *
 
 #define DEBUG_SUBSYSTEM S_MDS
 
+#include <linux/fs.h>
+#include <libcfs/linux/linux-fs.h>
 #include "mdt_internal.h"
 
-static const struct file_operations mdt_open_files_seq_fops = {
-       .owner   = THIS_MODULE,
-       .open    = lprocfs_mdt_open_files_seq_open,
-       .read    = seq_read,
-       .llseek  = seq_lseek,
-       .release = seq_release,
+static const struct proc_ops mdt_open_files_seq_fops = {
+       PROC_OWNER(THIS_MODULE)
+       .proc_open              = lprocfs_mdt_open_files_seq_open,
+       .proc_read              = seq_read,
+       .proc_lseek             = seq_lseek,
+       .proc_release           = seq_release,
 };
 
 /**
@@ -71,8 +68,6 @@ int mdt_export_stats_init(struct obd_device *obd, struct obd_export *exp,
        int rc;
        ENTRY;
 
-       LASSERT(!obd->obd_uses_nid_stats);
-
        rc = lprocfs_exp_setup(exp, client_nid);
        if (rc != 0)
                /* Mask error for already created /proc entries */
@@ -84,7 +79,7 @@ int mdt_export_stats_init(struct obd_device *obd, struct obd_export *exp,
        if (stats->nid_stats == NULL)
                RETURN(-ENOMEM);
 
-       mdt_stats_counter_init(stats->nid_stats);
+       mdt_stats_counter_init(stats->nid_stats, 0);
 
        rc = lprocfs_register_stats(stats->nid_proc, "stats", stats->nid_stats);
        if (rc != 0) {