F2FS: Backport to 3.4
Based off of patches here:
nowcomputing/f2fs-backports#1
Change-Id: I2be6d8abf4e3e4c6b9e8d635700930af432fe37a
diff --git a/fs/f2fs/acl.c b/fs/f2fs/acl.c
index 683eb44..c7c3318 100644
--- a/fs/f2fs/acl.c
+++ b/fs/f2fs/acl.c
@@ -88,16 +88,8 @@
break;
case ACL_USER:
- acl->a_entries[i].e_uid =
- make_kuid(&init_user_ns,
- le32_to_cpu(entry->e_id));
- entry = (struct f2fs_acl_entry *)((char *)entry +
- sizeof(struct f2fs_acl_entry));
- break;
case ACL_GROUP:
- acl->a_entries[i].e_gid =
- make_kgid(&init_user_ns,
- le32_to_cpu(entry->e_id));
+ acl->a_entries[i].e_id = le32_to_cpu(entry->e_id);
entry = (struct f2fs_acl_entry *)((char *)entry +
sizeof(struct f2fs_acl_entry));
break;
@@ -134,16 +126,8 @@
switch (acl->a_entries[i].e_tag) {
case ACL_USER:
- entry->e_id = cpu_to_le32(
- from_kuid(&init_user_ns,
- acl->a_entries[i].e_uid));
- entry = (struct f2fs_acl_entry *)((char *)entry +
- sizeof(struct f2fs_acl_entry));
- break;
case ACL_GROUP:
- entry->e_id = cpu_to_le32(
- from_kgid(&init_user_ns,
- acl->a_entries[i].e_gid));
+ entry->e_id = cpu_to_le32(acl->a_entries[i].e_id);
entry = (struct f2fs_acl_entry *)((char *)entry +
sizeof(struct f2fs_acl_entry));
break;
@@ -357,7 +341,7 @@
return PTR_ERR(acl);
if (!acl)
return -ENODATA;
- error = posix_acl_to_xattr(&init_user_ns, acl, buffer, size);
+ error = posix_acl_to_xattr(acl, buffer, size);
posix_acl_release(acl);
return error;
@@ -379,7 +363,7 @@
return -EPERM;
if (value) {
- acl = posix_acl_from_xattr(&init_user_ns, value, size);
+ acl = posix_acl_from_xattr(value, size);
if (IS_ERR(acl))
return PTR_ERR(acl);
if (acl) {