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

Tao Ma tao.ma at oracle.com
Wed Jul 14 07:58:46 PDT 2010


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





More information about the Ocfs2-devel mailing list