[Ocfs2-devel] [PATCH] ocfs2/xattr: assign errno to 'ret' in ocfs2_calc_xattr_init()

Gang He ghe at suse.com
Thu Jan 11 00:40:59 PST 2018


Looks good.


>>> 
> We need catch the errno returned by ocfs2_xattr_get_nolock() and assign
> it to 'ret' for printing and noticing upper callers.
> 
> Signed-off-by: Jun Piao <piaojun at huawei.com>
> Reviewed-by: Alex Chen <alex.chen at huawei.com>
> Reviewed-by: Yiwen Jiang <jiangyiwen at huawei.com>
Reviewed-by: Gang He <ghe at suse.com>

> ---
>  fs/ocfs2/xattr.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/ocfs2/xattr.c b/fs/ocfs2/xattr.c
> index 5fdf269..439f567 100644
> --- a/fs/ocfs2/xattr.c
> +++ b/fs/ocfs2/xattr.c
> @@ -646,6 +646,7 @@ int ocfs2_calc_xattr_init(struct inode *dir,
>  			if (S_ISDIR(mode))
>  				a_size <<= 1;
>  		} else if (acl_len != 0 && acl_len != -ENODATA) {
> +			ret = acl_len;
>  			mlog_errno(ret);
>  			return ret;
>  		}
> -- 
> 
> _______________________________________________
> 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