aboutsummaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorJunxiao Bi <junxiao.bi@oracle.com>2015-11-20 15:57:30 -0800
committerSasha Levin <sasha.levin@oracle.com>2016-01-21 11:23:29 -0500
commit33fde5c22c1a352ec56a7500ab94cdfc7574faed (patch)
treeeb7ca391973e1c40df4f64ba91cf2e6745b519d2 /fs
parent2de7d46289702bcc5727cb70857f8f6860c85ce8 (diff)
ocfs2: fix umask ignored issue
[ Upstream commit 8f1eb48758aacf6c1ffce18179295adbf3bd7640 ] New created file's mode is not masked with umask, and this makes umask not work for ocfs2 volume. Fixes: 702e5bc ("ocfs2: use generic posix ACL infrastructure") Signed-off-by: Junxiao Bi <junxiao.bi@oracle.com> Cc: Gang He <ghe@suse.com> Cc: Mark Fasheh <mfasheh@suse.de> Cc: Joel Becker <jlbec@evilplan.org> Cc: <stable@vger.kernel.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/ocfs2/namei.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
index 914c121ec890..9fc1daecdfb3 100644
--- a/fs/ocfs2/namei.c
+++ b/fs/ocfs2/namei.c
@@ -361,6 +361,8 @@ static int ocfs2_mknod(struct inode *dir,
mlog_errno(status);
goto leave;
}
+ /* update inode->i_mode after mask with "umask". */
+ inode->i_mode = mode;
handle = ocfs2_start_trans(osb, ocfs2_mknod_credits(osb->sb,
S_ISDIR(mode),