@@ -559,8 +559,14 @@ int copy_fsxattr_to_user(const struct fileattr *fa, struct fsxattr __user *ufa)
}
EXPORT_SYMBOL(copy_fsxattr_to_user);
-static int copy_fsxattr_from_user(struct fileattr *fa,
- struct fsxattr __user *ufa)
+/**
+ * copy_fsxattr_from_user - copy fsxattr from userspace.
+ * @fa: fileattr pointer
+ * @ufa: fsxattr user pointer
+ *
+ * Return: 0 on success, or -EFAULT on failure.
+ */
+int copy_fsxattr_from_user(struct fileattr *fa, struct fsxattr __user *ufa)
{
struct fsxattr xfa;
@@ -575,6 +581,7 @@ static int copy_fsxattr_from_user(struct fileattr *fa,
return 0;
}
+EXPORT_SYMBOL(copy_fsxattr_from_user);
/*
* Generic function to check FS_IOC_FSSETXATTR/FS_IOC_SETFLAGS values and reject
@@ -34,6 +34,7 @@ struct fileattr {
};
int copy_fsxattr_to_user(const struct fileattr *fa, struct fsxattr __user *ufa);
+int copy_fsxattr_from_user(struct fileattr *fa, struct fsxattr __user *ufa)
void fileattr_fill_xflags(struct fileattr *fa, u32 xflags);
void fileattr_fill_flags(struct fileattr *fa, u32 flags);
Export copy_fsxattr_from_user(). This function will be used in further patch by XFS in XFS_IOC_SETFSXATTRAT ioctl. Signed-off-by: Andrey Albershteyn <aalbersh@redhat.com> --- fs/ioctl.c | 11 +++++++++-- include/linux/fileattr.h | 1 + 2 files changed, 10 insertions(+), 2 deletions(-)