All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH 1/1] ocfs2: don't overwrite error codes in ocfs2_init_acl
@ 2010-07-14 10:11 Tiger Yang
  2010-07-14 14:58 ` Tao Ma
  2010-07-14 20:24 ` Sunil Mushran
  0 siblings, 2 replies; 4+ messages in thread
From: Tiger Yang @ 2010-07-14 10:11 UTC (permalink / raw)
  To: ocfs2-devel

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 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Ocfs2-devel] [PATCH 1/1] ocfs2: don't overwrite error codes in ocfs2_init_acl
  2010-07-14 10:11 [Ocfs2-devel] [PATCH 1/1] ocfs2: don't overwrite error codes in ocfs2_init_acl Tiger Yang
@ 2010-07-14 14:58 ` Tao Ma
  2010-07-15 21:24   ` Sunil Mushran
  2010-07-14 20:24 ` Sunil Mushran
  1 sibling, 1 reply; 4+ messages in thread
From: Tao Ma @ 2010-07-14 14:58 UTC (permalink / raw)
  To: ocfs2-devel

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Ocfs2-devel] [PATCH 1/1] ocfs2: don't overwrite error codes in ocfs2_init_acl
  2010-07-14 10:11 [Ocfs2-devel] [PATCH 1/1] ocfs2: don't overwrite error codes in ocfs2_init_acl Tiger Yang
  2010-07-14 14:58 ` Tao Ma
@ 2010-07-14 20:24 ` Sunil Mushran
  1 sibling, 0 replies; 4+ messages in thread
From: Sunil Mushran @ 2010-07-14 20:24 UTC (permalink / raw)
  To: ocfs2-devel

Tiger,

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

On 07/14/2010 03:11 AM, Tiger Yang wrote:
> Hi, all,
>
> Pawel(pzlist at mp.pl) reported a bug in ocfs2 acl. This patch fix this 
> issue.
>
> 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 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Ocfs2-devel] [PATCH 1/1] ocfs2: don't overwrite error codes in ocfs2_init_acl
  2010-07-14 14:58 ` Tao Ma
@ 2010-07-15 21:24   ` Sunil Mushran
  0 siblings, 0 replies; 4+ messages in thread
From: Sunil Mushran @ 2010-07-15 21:24 UTC (permalink / raw)
  To: ocfs2-devel

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
>    

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-07-15 21:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-14 10:11 [Ocfs2-devel] [PATCH 1/1] ocfs2: don't overwrite error codes in ocfs2_init_acl Tiger Yang
2010-07-14 14:58 ` Tao Ma
2010-07-15 21:24   ` Sunil Mushran
2010-07-14 20:24 ` Sunil Mushran

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.