]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ocfs2: fix umask ignored issue
authorJunxiao Bi <junxiao.bi@oracle.com>
Mon, 30 Nov 2015 21:44:50 +0000 (13:44 -0800)
committerSantosh Shilimkar <santosh.shilimkar@oracle.com>
Mon, 30 Nov 2015 21:44:50 +0000 (13:44 -0800)
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 <srinivas.eeda@oracle.com>
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>
(cherry picked from commit 8f1eb48758aacf6c1ffce18179295adbf3bd7640)

fs/ocfs2/namei.c

index 9156897b2efff20be99436f1c4371ef76b480726..ee593e11cdb2b089fb1bfa949ef1c767a5d2bee5 100644 (file)
@@ -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),