Whamcloud - gitweb
LU-5396 lnet/klnds: add sparse annotation __user wherever needed
[fs/lustre-release.git] / lustre / fld / lproc_fld.c
index 873fa23..8dd6fe4 100644 (file)
 
 #define DEBUG_SUBSYSTEM S_FLD
 
-#ifdef __KERNEL__
-# include <libcfs/libcfs.h>
-# include <linux/module.h>
-#else /* __KERNEL__ */
-# include <liblustre.h>
-#endif
-
+#include <libcfs/libcfs.h>
+#include <linux/module.h>
 #include <dt_object.h>
 #include <obd_support.h>
 #include <lustre_fld.h>
@@ -90,7 +85,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;
@@ -123,7 +118,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;