summaryrefslogtreecommitdiffstats
path: root/fs/fs_struct.c
diff options
context:
space:
mode:
authorAl Viro2009-03-30 01:08:22 +0200
committerAl Viro2009-04-01 05:00:26 +0200
commitce3b0f8d5c2203301fc87f3aaaed73e5819e2a48 (patch)
treeab952affafe18e604f6aaf6b13315b9435588e60 /fs/fs_struct.c
parentcheck_unsafe_exec() doesn't care about signal handlers sharing (diff)
downloadkernel-qcow2-linux-ce3b0f8d5c2203301fc87f3aaaed73e5819e2a48.tar.gz
kernel-qcow2-linux-ce3b0f8d5c2203301fc87f3aaaed73e5819e2a48.tar.xz
kernel-qcow2-linux-ce3b0f8d5c2203301fc87f3aaaed73e5819e2a48.zip
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/fs_struct.c')
-rw-r--r--fs/fs_struct.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/fs_struct.c b/fs/fs_struct.c
index 41cff72b377b..6ac219338670 100644
--- a/fs/fs_struct.c
+++ b/fs/fs_struct.c
@@ -138,6 +138,12 @@ int unshare_fs_struct(void)
}
EXPORT_SYMBOL_GPL(unshare_fs_struct);
+int current_umask(void)
+{
+ return current->fs->umask;
+}
+EXPORT_SYMBOL(current_umask);
+
/* to be mentioned only in INIT_TASK */
struct fs_struct init_fs = {
.users = 1,