Whamcloud - gitweb
LU-5275 lprocfs: reduce scope of params_tree.h
[fs/lustre-release.git] / lustre / fld / lproc_fld.c
index fd8ddf3..bbbecb3 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, 2013, Intel Corporation.
+ * Copyright (c) 2012, 2014, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -50,7 +50,6 @@
 #include <lustre_fld.h>
 #include <lustre_fid.h>
 #include "fld_internal.h"
-#include <md_object.h>
 
 #ifdef LPROCFS
 static int
@@ -85,7 +84,7 @@ fld_proc_hash_seq_show(struct seq_file *m, void *unused)
 }
 
 static ssize_t
-fld_proc_hash_seq_write(struct file *file, const char *buffer,
+fld_proc_hash_seq_write(struct file *file, const char __user *buffer,
                        size_t count, loff_t *off)
 {
        struct lu_client_fld *fld = ((struct seq_file *)file->private_data)->private;
@@ -118,7 +117,7 @@ fld_proc_hash_seq_write(struct file *file, const char *buffer,
 }
 
 static ssize_t
-lprocfs_cache_flush_seq_write(struct file *file, const char *buffer,
+lprocfs_cache_flush_seq_write(struct file *file, const char __user *buffer,
                               size_t count, loff_t *pos)
 {
        struct lu_client_fld *fld = ((struct seq_file *)file->private_data)->private;
@@ -280,7 +279,10 @@ static int fldb_seq_open(struct inode *inode, struct file *file)
        int                     env_init = 0;
        int                     rc;
 
-       LPROCFS_ENTRY_CHECK(PDE(inode));
+       rc = LPROCFS_ENTRY_CHECK(inode);
+       if (rc < 0)
+               return rc;
+
        rc = seq_open(file, &fldb_sops);
        if (rc)
                GOTO(out, rc);