Skip to contentSkip to conversation

uapi: move struct reiserfs_security_handle out from linux/reiserfs_xattr.h

RFC PATCH New Dmitry V. Levin 1 participant 1 message Feb 28, 2017

lore
Share & tools
lore
#0 lore raw

RFC PATCH 1/1 uapi: move struct reiserfs_security_handle out from linux/reiserfs_xattr.h

As there seems to be no way struct reiserfs_security_handle could be passed between the kernel and userspace, move its definition from the UAPI header to a private header fs/reiserfs/xattr.h which is the only file in the tree that includes linux/reiserfs_xattr.h.

This also fixes the following linux/reiserfs_xattr.h userspace compilation error:

/usr/include/linux/reiserfs_xattr.h:21:2: error: unknown type name 'size_t'
size_t length;

---
Perhaps the whole file could be moved out from the UAPI. I'm not sure about that, though.

 fs/reiserfs/xattr.h                 | 6 ++++++
 include/uapi/linux/reiserfs_xattr.h | 6 ------
 2 files changed, 6 insertions(+), 6 deletions(-)
fs/reiserfs/xattr.h +6 -0
index 613ff5a..1ae77ed 100644
@@ -4,6 +4,12 @@
 #include <linux/rwsem.h>
 #include <linux/xattr.h>
 
+struct reiserfs_security_handle {
+	const char *name;
+	void *value;
+	size_t length;
+};
+
 struct inode;
 struct dentry;
 struct iattr;
include/uapi/linux/reiserfs_xattr.h +0 -6
index 38fdd64..e07f4c7 100644
@@ -15,10 +15,4 @@ struct reiserfs_xattr_header {
 	__le32 h_hash;		/* hash of the value */
 };
 
-struct reiserfs_security_handle {
-	const char *name;
-	void *value;
-	size_t length;
-};
-
 #endif  /*  _LINUX_REISERFS_XATTR_H  */
Signature · 1 line
ldv