ocfs2: don't overwrite error codes in ocfs2_init_acl
PATCH 1/1 ocfs2: don't overwrite error codes in ocfs2_init_acl
Hi, all,
Pawel(pzlist at mp.pl) reported a bug in ocfs2 acl. This patch fix this issue.
Thanks,
tiger
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ocfs2-don-t-overwrite-error-codes-in-ocfs2_init_acl.patch
Type: text/x-patch
Size: 1303 bytes
Desc: not available
Url : http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20100714/faba2d81/attachment.bin
PATCH 1/1 ocfs2: don't overwrite error codes in ocfs2_init_acl
Hi Tiger,
Quoted 7 lines · Tiger Yang
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
PATCH 1/1 ocfs2: don't overwrite error codes in ocfs2_init_acl
Good catch.
Quoted 37 lines · Tao Ma
Hi Tiger,
Quoted 8 lines · Tiger Yang
Hi, all,
Pawel(pzlist at mp.pl) reported a bug in ocfs2 acl. This patch fix this issue.
Thanks,
tiger(quoted diff) +3
-1@@ -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.
(quoted diff) +2
-0+ 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
PATCH 1/1 ocfs2: don't overwrite error codes in ocfs2_init_acl
In reply to Tiger YangTiger,
Please can you add Reported-by to the patch.
Appears the issue was caused by commit fcefd25ac89239cb57fa198f125a79ff85468c75. fcefd25ac89239cb57fa198f125a79ff85468c75 tags/v2.6.34-rc3~5^2~7
Also add that the patch needs to be backported to 2.6.34. cc stable at kernel.org
the patch.
Sunil
Quoted 5 lines · Tiger Yang
Hi, all,
Pawel(pzlist at mp.pl) reported a bug in ocfs2 acl. This patch fix this issue.
Quoted 8 lines
Thanks,
tiger_______________________________________________
Ocfs2-devel mailing list
Ocfs2-devel at oss.oracle.com
http://oss.oracle.com/mailman/listinfo/ocfs2-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20100714/f7d178ab/attachment.html