aboutsummaryrefslogtreecommitdiffstats
path: root/fs/namei.c
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2009-03-29 19:08:22 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2009-03-31 23:00:26 -0400
commitce3b0f8d5c2203301fc87f3aaaed73e5819e2a48 (patch)
treeab952affafe18e604f6aaf6b13315b9435588e60 /fs/namei.c
parentf1191b50ec11c8e2ca766d6d99eb5bb9d2c084a3 (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/namei.c')
-rw-r--r--fs/namei.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/namei.c b/fs/namei.c
index 4c65a6460138..964c0249444b 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1578,7 +1578,7 @@ static int __open_namei_create(struct nameidata *nd, struct path *path,
1578 struct dentry *dir = nd->path.dentry; 1578 struct dentry *dir = nd->path.dentry;
1579 1579
1580 if (!IS_POSIXACL(dir->d_inode)) 1580 if (!IS_POSIXACL(dir->d_inode))
1581 mode &= ~current->fs->umask; 1581 mode &= ~current_umask();
1582 error = security_path_mknod(&nd->path, path->dentry, mode, 0); 1582 error = security_path_mknod(&nd->path, path->dentry, mode, 0);
1583 if (error) 1583 if (error)
1584 goto out_unlock; 1584 goto out_unlock;
@@ -1989,7 +1989,7 @@ SYSCALL_DEFINE4(mknodat, int, dfd, const char __user *, filename, int, mode,
1989 goto out_unlock; 1989 goto out_unlock;
1990 } 1990 }
1991 if (!IS_POSIXACL(nd.path.dentry->d_inode)) 1991 if (!IS_POSIXACL(nd.path.dentry->d_inode))
1992 mode &= ~current->fs->umask; 1992 mode &= ~current_umask();
1993 error = may_mknod(mode); 1993 error = may_mknod(mode);
1994 if (error) 1994 if (error)
1995 goto out_dput; 1995 goto out_dput;
@@ -2067,7 +2067,7 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const char __user *, pathname, int, mode)
2067 goto out_unlock; 2067 goto out_unlock;
2068 2068
2069 if (!IS_POSIXACL(nd.path.dentry->d_inode)) 2069 if (!IS_POSIXACL(nd.path.dentry->d_inode))
2070 mode &= ~current->fs->umask; 2070 mode &= ~current_umask();
2071 error = mnt_want_write(nd.path.mnt); 2071 error = mnt_want_write(nd.path.mnt);
2072 if (error) 2072 if (error)
2073 goto out_dput; 2073 goto out_dput;