ocfs2: fix umask ignored issue
PATCH 1/1 ocfs2: fix umask ignored issue
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 <[email protected]>
--- fs/ocfs2/namei.c | 2 ++ 1 file changed, 2 insertions(+)
fs/ocfs2/namei.c +2 -0
@@ -372,6 +372,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),
Signature · 1 line
1.7.9.5
PATCH 1/1 ocfs2: fix umask ignored issue
Hello Junxiao,
Thank for your fix, I also found that the issue happened on openSuSe13.2 (3.16.7-24-desktop), although the issue does not exist on sles11sp4 (3.0.101-63-default), I feel that this issue belongs to a regression bug.
Thanks
Gang
Quoted 31 lines
Quoted 1 line
Quoted 1 line
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 <[email protected]>--- fs/ocfs2/namei.c | 2 ++ 1 file changed, 2 insertions(+)fs/ocfs2/namei.c +2
-0@@ -372,6 +372,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),Signature · 7 lines
1.7.9.5 _______________________________________________ Ocfs2-devel mailing list Ocfs2-devel at oss.oracle.com https://oss.oracle.com/mailman/listinfo/ocfs2-devel