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>
This commit is contained in:
@@ -227,7 +227,7 @@ xfs_vn_mknod(
|
||||
xfs_dentry_to_name(&name, dentry);
|
||||
|
||||
if (IS_POSIXACL(dir) && !default_acl)
|
||||
mode &= ~current->fs->umask;
|
||||
mode &= ~current_umask();
|
||||
|
||||
switch (mode & S_IFMT) {
|
||||
case S_IFCHR:
|
||||
@@ -416,7 +416,7 @@ xfs_vn_symlink(
|
||||
mode_t mode;
|
||||
|
||||
mode = S_IFLNK |
|
||||
(irix_symlink_mode ? 0777 & ~current->fs->umask : S_IRWXUGO);
|
||||
(irix_symlink_mode ? 0777 & ~current_umask() : S_IRWXUGO);
|
||||
xfs_dentry_to_name(&name, dentry);
|
||||
|
||||
error = xfs_symlink(XFS_I(dir), &name, symname, mode, &cip, NULL);
|
||||
|
Reference in New Issue
Block a user