[Ocfs2-devel] [PATCH] ocfs2: fix umask ignored issue

Gang He ghe at suse.com
Wed Nov 11 18:13:38 PST 2015


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 


>>> 
> 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 at oracle.com>
> ---
>  fs/ocfs2/namei.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/ocfs2/namei.c b/fs/ocfs2/namei.c
> index 3b48ac2..a03f6f4 100644
> --- a/fs/ocfs2/namei.c
> +++ b/fs/ocfs2/namei.c
> @@ -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),
> -- 
> 1.7.9.5
> 
> 
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel at oss.oracle.com 
> https://oss.oracle.com/mailman/listinfo/ocfs2-devel




More information about the Ocfs2-devel mailing list