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/cifs | |
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/cifs')
-rw-r--r-- | fs/cifs/dir.c | 4 | ||||
-rw-r--r-- | fs/cifs/inode.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/fs/cifs/dir.c b/fs/cifs/dir.c index 2f35cccfcd8d..54dce78fbb73 100644 --- a/fs/cifs/dir.c +++ b/fs/cifs/dir.c | |||
@@ -254,7 +254,7 @@ cifs_create(struct inode *inode, struct dentry *direntry, int mode, | |||
254 | return -ENOMEM; | 254 | return -ENOMEM; |
255 | } | 255 | } |
256 | 256 | ||
257 | mode &= ~current->fs->umask; | 257 | mode &= ~current_umask(); |
258 | if (oplockEnabled) | 258 | if (oplockEnabled) |
259 | oplock = REQ_OPLOCK; | 259 | oplock = REQ_OPLOCK; |
260 | 260 | ||
@@ -479,7 +479,7 @@ int cifs_mknod(struct inode *inode, struct dentry *direntry, int mode, | |||
479 | rc = -ENOMEM; | 479 | rc = -ENOMEM; |
480 | else if (pTcon->unix_ext) { | 480 | else if (pTcon->unix_ext) { |
481 | struct cifs_unix_set_info_args args = { | 481 | struct cifs_unix_set_info_args args = { |
482 | .mode = mode & ~current->fs->umask, | 482 | .mode = mode & ~current_umask(), |
483 | .ctime = NO_CHANGE_64, | 483 | .ctime = NO_CHANGE_64, |
484 | .atime = NO_CHANGE_64, | 484 | .atime = NO_CHANGE_64, |
485 | .mtime = NO_CHANGE_64, | 485 | .mtime = NO_CHANGE_64, |
diff --git a/fs/cifs/inode.c b/fs/cifs/inode.c index a8797cc60805..f121a80fdd6f 100644 --- a/fs/cifs/inode.c +++ b/fs/cifs/inode.c | |||
@@ -1125,7 +1125,7 @@ int cifs_mkdir(struct inode *inode, struct dentry *direntry, int mode) | |||
1125 | goto mkdir_out; | 1125 | goto mkdir_out; |
1126 | } | 1126 | } |
1127 | 1127 | ||
1128 | mode &= ~current->fs->umask; | 1128 | mode &= ~current_umask(); |
1129 | rc = CIFSPOSIXCreate(xid, pTcon, SMB_O_DIRECTORY | SMB_O_CREAT, | 1129 | rc = CIFSPOSIXCreate(xid, pTcon, SMB_O_DIRECTORY | SMB_O_CREAT, |
1130 | mode, NULL /* netfid */, pInfo, &oplock, | 1130 | mode, NULL /* netfid */, pInfo, &oplock, |
1131 | full_path, cifs_sb->local_nls, | 1131 | full_path, cifs_sb->local_nls, |
@@ -1204,7 +1204,7 @@ mkdir_get_info: | |||
1204 | if ((direntry->d_inode) && (direntry->d_inode->i_nlink < 2)) | 1204 | if ((direntry->d_inode) && (direntry->d_inode->i_nlink < 2)) |
1205 | direntry->d_inode->i_nlink = 2; | 1205 | direntry->d_inode->i_nlink = 2; |
1206 | 1206 | ||
1207 | mode &= ~current->fs->umask; | 1207 | mode &= ~current_umask(); |
1208 | /* must turn on setgid bit if parent dir has it */ | 1208 | /* must turn on setgid bit if parent dir has it */ |
1209 | if (inode->i_mode & S_ISGID) | 1209 | if (inode->i_mode & S_ISGID) |
1210 | mode |= S_ISGID; | 1210 | mode |= S_ISGID; |