diff options
Diffstat (limited to 'fs/namei.c')
-rw-r--r-- | fs/namei.c | 6 |
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; |