diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2009-03-29 19:08:22 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2009-03-31 23:00:26 -0400 |
commit | ce3b0f8d5c2203301fc87f3aaaed73e5819e2a48 (patch) | |
tree | ab952affafe18e604f6aaf6b13315b9435588e60 /fs/xfs/linux-2.6 | |
parent | f1191b50ec11c8e2ca766d6d99eb5bb9d2c084a3 (diff) |
New helper - current_umask()
current->fs->umask is what most of fs_struct users are doing.
Put that into a helper function.
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/xfs/linux-2.6')
-rw-r--r-- | fs/xfs/linux-2.6/xfs_iops.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/linux-2.6/xfs_iops.c b/fs/xfs/linux-2.6/xfs_iops.c index 7aa53fefc67f..2940612e3aeb 100644 --- a/fs/xfs/linux-2.6/xfs_iops.c +++ b/fs/xfs/linux-2.6/xfs_iops.c | |||
@@ -227,7 +227,7 @@ xfs_vn_mknod( | |||
227 | xfs_dentry_to_name(&name, dentry); | 227 | xfs_dentry_to_name(&name, dentry); |
228 | 228 | ||
229 | if (IS_POSIXACL(dir) && !default_acl) | 229 | if (IS_POSIXACL(dir) && !default_acl) |
230 | mode &= ~current->fs->umask; | 230 | mode &= ~current_umask(); |
231 | 231 | ||
232 | switch (mode & S_IFMT) { | 232 | switch (mode & S_IFMT) { |
233 | case S_IFCHR: | 233 | case S_IFCHR: |
@@ -416,7 +416,7 @@ xfs_vn_symlink( | |||
416 | mode_t mode; | 416 | mode_t mode; |
417 | 417 | ||
418 | mode = S_IFLNK | | 418 | mode = S_IFLNK | |
419 | (irix_symlink_mode ? 0777 & ~current->fs->umask : S_IRWXUGO); | 419 | (irix_symlink_mode ? 0777 & ~current_umask() : S_IRWXUGO); |
420 | xfs_dentry_to_name(&name, dentry); | 420 | xfs_dentry_to_name(&name, dentry); |
421 | 421 | ||
422 | error = xfs_symlink(XFS_I(dir), &name, symname, mode, &cip, NULL); | 422 | error = xfs_symlink(XFS_I(dir), &name, symname, mode, &cip, NULL); |