diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-07-24 02:37:50 +0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2011-08-01 10:09:42 +0400 |
commit | d3fb612076eebec6f67257db0c7a9666ac7e5892 (patch) | |
tree | 5265fca258a74ffa75b845998492abb9446db72c /fs/generic_acl.c | |
parent | 782b94cdf577b4df1feb376f372dccc28e66a771 (diff) | |
download | linux-d3fb612076eebec6f67257db0c7a9666ac7e5892.tar.xz |
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/generic_acl.c')
-rw-r--r-- | fs/generic_acl.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/fs/generic_acl.c b/fs/generic_acl.c index d5e33a077a67..2dd434d6ff29 100644 --- a/fs/generic_acl.c +++ b/fs/generic_acl.c @@ -125,21 +125,20 @@ int generic_acl_init(struct inode *inode, struct inode *dir) { struct posix_acl *acl = NULL; - mode_t mode = inode->i_mode; int error; - inode->i_mode = mode & ~current_umask(); if (!S_ISLNK(inode->i_mode)) acl = get_cached_acl(dir, ACL_TYPE_DEFAULT); if (acl) { if (S_ISDIR(inode->i_mode)) set_cached_acl(inode, ACL_TYPE_DEFAULT, acl); - error = posix_acl_create(&acl, GFP_KERNEL, &mode); + error = posix_acl_create(&acl, GFP_KERNEL, &inode->i_mode); if (error < 0) return error; - inode->i_mode = mode; if (error > 0) set_cached_acl(inode, ACL_TYPE_ACCESS, acl); + } else { + inode->i_mode &= ~current_umask(); } error = 0; |