diff options
Diffstat (limited to 'fs/posix_acl.c')
| -rw-r--r-- | fs/posix_acl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/posix_acl.c b/fs/posix_acl.c index 11c54fd51e16..9e363e41dacc 100644 --- a/fs/posix_acl.c +++ b/fs/posix_acl.c | |||
| @@ -723,7 +723,7 @@ posix_acl_to_xattr(struct user_namespace *user_ns, const struct posix_acl *acl, | |||
| 723 | void *buffer, size_t size) | 723 | void *buffer, size_t size) |
| 724 | { | 724 | { |
| 725 | posix_acl_xattr_header *ext_acl = (posix_acl_xattr_header *)buffer; | 725 | posix_acl_xattr_header *ext_acl = (posix_acl_xattr_header *)buffer; |
| 726 | posix_acl_xattr_entry *ext_entry = ext_acl->a_entries; | 726 | posix_acl_xattr_entry *ext_entry; |
| 727 | int real_size, n; | 727 | int real_size, n; |
| 728 | 728 | ||
| 729 | real_size = posix_acl_xattr_size(acl->a_count); | 729 | real_size = posix_acl_xattr_size(acl->a_count); |
| @@ -731,7 +731,8 @@ posix_acl_to_xattr(struct user_namespace *user_ns, const struct posix_acl *acl, | |||
| 731 | return real_size; | 731 | return real_size; |
| 732 | if (real_size > size) | 732 | if (real_size > size) |
| 733 | return -ERANGE; | 733 | return -ERANGE; |
| 734 | 734 | ||
| 735 | ext_entry = ext_acl->a_entries; | ||
| 735 | ext_acl->a_version = cpu_to_le32(POSIX_ACL_XATTR_VERSION); | 736 | ext_acl->a_version = cpu_to_le32(POSIX_ACL_XATTR_VERSION); |
| 736 | 737 | ||
| 737 | for (n=0; n < acl->a_count; n++, ext_entry++) { | 738 | for (n=0; n < acl->a_count; n++, ext_entry++) { |
