Whamcloud - gitweb
LU-13344 libcfs: Abstract proc_fs with proc_ops
[fs/lustre-release.git] / libcfs / include / libcfs / linux / linux-fs.h
index a5beff2..78a75c7 100644 (file)
@@ -60,4 +60,21 @@ static inline struct dentry *file_dentry(const struct file *file)
 #define DTTOIF(dirtype)                ((dirtype) << S_DT_SHIFT)
 #endif
 
+#ifdef HAVE_PROC_OPS
+#define PROC_OWNER(_fn)
+#else
+#define proc_ops file_operations
+#define PROC_OWNER(_owner)             .owner = (_owner),
+#define proc_open                      open
+#define proc_read                      read
+#define proc_write                     write
+#define proc_lseek                     llseek
+#define proc_release                   release
+#define proc_poll                      poll
+#define proc_ioctl                     unlocked_ioctl
+#define proc_compat_ioctl              compat_ioctl
+#define proc_mmap                      mmap
+#define proc_get_unmapped_area         get_unmapped_area
+#endif
+
 #endif