[Ocfs2-devel] [PATCH 1/1] ocfs2: don't overwrite error codes in ocfs2_init_acl

Sunil Mushran sunil.mushran at oracle.com
Thu Jul 15 14:24:29 PDT 2010


Good catch.

On 07/14/2010 07:58 AM, Tao Ma wrote:
> Hi Tiger,
> Tiger Yang wrote:
>    
>> Hi, all,
>>
>> Pawel(pzlist at mp.pl) reported a bug in ocfs2 acl. This patch fix this
>> issue.
>>
>> Thanks,
>> tiger
>>      
> @@ -381,7 +381,11 @@ int ocfs2_init_acl(handle_t *handle,
>
>   		mode = inode->i_mode;
>   		ret = posix_acl_create_masq(clone,&mode);
>   		if (ret>= 0) {
> -			ret = ocfs2_acl_set_mode(inode, di_bh, handle, mode);
> +			ret2 = ocfs2_acl_set_mode(inode, di_bh, handle, mode);
> +			if (ret2) {
> +				mlog_errno(ret2);
> You need to set ret = ret2 here so that we can return the error value to the caller.
> +				goto cleanup;
> +			}
>   			if (ret>  0) {
>   				ret = ocfs2_set_acl(handle, inode,
>   						    di_bh, ACL_TYPE_ACCESS,
>
> Regards,
> Tao
>
>
>
> _______________________________________________
> Ocfs2-devel mailing list
> Ocfs2-devel at oss.oracle.com
> http://oss.oracle.com/mailman/listinfo/ocfs2-devel
>    




More information about the Ocfs2-devel mailing list