diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-23 18:37:50 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-08-01 02:09:42 -0400 |
commit | d3fb612076eebec6f67257db0c7a9666ac7e5892 (patch) | |
tree | 5265fca258a74ffa75b845998492abb9446db72c /fs/ext4/acl.c | |
parent | 782b94cdf577b4df1feb376f372dccc28e66a771 (diff) |
switch posix_acl_create() to umode_t *
so we can pass &inode->i_mode to it
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/ext4/acl.c')
-rw-r--r-- | fs/ext4/acl.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/ext4/acl.c b/fs/ext4/acl.c index dca2d1ded931..74e469ccdf50 100644 --- a/fs/ext4/acl.c +++ b/fs/ext4/acl.c | |||
@@ -259,19 +259,16 @@ ext4_init_acl(handle_t *handle, struct inode *inode, struct inode *dir) | |||
259 | inode->i_mode &= ~current_umask(); | 259 | inode->i_mode &= ~current_umask(); |
260 | } | 260 | } |
261 | if (test_opt(inode->i_sb, POSIX_ACL) && acl) { | 261 | if (test_opt(inode->i_sb, POSIX_ACL) && acl) { |
262 | mode_t mode = inode->i_mode; | ||
263 | |||
264 | if (S_ISDIR(inode->i_mode)) { | 262 | if (S_ISDIR(inode->i_mode)) { |
265 | error = ext4_set_acl(handle, inode, | 263 | error = ext4_set_acl(handle, inode, |
266 | ACL_TYPE_DEFAULT, acl); | 264 | ACL_TYPE_DEFAULT, acl); |
267 | if (error) | 265 | if (error) |
268 | goto cleanup; | 266 | goto cleanup; |
269 | } | 267 | } |
270 | error = posix_acl_create(&acl, GFP_NOFS, &mode); | 268 | error = posix_acl_create(&acl, GFP_NOFS, &inode->i_mode); |
271 | if (error < 0) | 269 | if (error < 0) |
272 | return error; | 270 | return error; |
273 | 271 | ||
274 | inode->i_mode = mode; | ||
275 | if (error > 0) { | 272 | if (error > 0) { |
276 | /* This is an extended ACL */ | 273 | /* This is an extended ACL */ |
277 | error = ext4_set_acl(handle, inode, ACL_TYPE_ACCESS, acl); | 274 | error = ext4_set_acl(handle, inode, ACL_TYPE_ACCESS, acl); |