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/ext2 | |
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/ext2')
-rw-r--r-- | fs/ext2/acl.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/ext2/acl.c b/fs/ext2/acl.c index 52c053763942..0ce740489ab1 100644 --- a/fs/ext2/acl.c +++ b/fs/ext2/acl.c | |||
@@ -253,16 +253,14 @@ ext2_init_acl(struct inode *inode, struct inode *dir) | |||
253 | inode->i_mode &= ~current_umask(); | 253 | inode->i_mode &= ~current_umask(); |
254 | } | 254 | } |
255 | if (test_opt(inode->i_sb, POSIX_ACL) && acl) { | 255 | if (test_opt(inode->i_sb, POSIX_ACL) && acl) { |
256 | mode_t mode = inode->i_mode; | ||
257 | if (S_ISDIR(inode->i_mode)) { | 256 | if (S_ISDIR(inode->i_mode)) { |
258 | error = ext2_set_acl(inode, ACL_TYPE_DEFAULT, acl); | 257 | error = ext2_set_acl(inode, ACL_TYPE_DEFAULT, acl); |
259 | if (error) | 258 | if (error) |
260 | goto cleanup; | 259 | goto cleanup; |
261 | } | 260 | } |
262 | error = posix_acl_create(&acl, GFP_KERNEL, &mode); | 261 | error = posix_acl_create(&acl, GFP_KERNEL, &inode->i_mode); |
263 | if (error < 0) | 262 | if (error < 0) |
264 | return error; | 263 | return error; |
265 | inode->i_mode = mode; | ||
266 | if (error > 0) { | 264 | if (error > 0) { |
267 | /* This is an extended ACL */ | 265 | /* This is an extended ACL */ |
268 | error = ext2_set_acl(inode, ACL_TYPE_ACCESS, acl); | 266 | error = ext2_set_acl(inode, ACL_TYPE_ACCESS, acl); |