From: Junxiao Bi Date: Mon, 30 Nov 2015 21:44:50 +0000 (-0800) Subject: ocfs2: fix umask ignored issue X-Git-Tag: v4.1.12-92~225^2 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=35f29b603200e1a373e2b8a2e9edb8d8e78db35a;p=users%2Fjedix%2Flinux-maple.git ocfs2: fix umask ignored issue Oracle-bug: 22155833 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") Acked-by: Srinivas Eeda Signed-off-by: Junxiao Bi Cc: Gang He Cc: Mark Fasheh Cc: Joel Becker Cc: Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds (cherry picked from commit 8f1eb48758aacf6c1ffce18179295adbf3bd7640) --- diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c index 9156897b2efff..ee593e11cdb2b 100644 --- a/fs/ocfs2/namei.c +++ b/fs/ocfs2/namei.c @@ -365,6 +365,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),