ocfs2-devel.oss.oracle.com archive mirror
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH 1/1 v2] ocfs2: do not overwrite error codes in ocfs2_init_acl
@ 2010-07-16  3:23 Tiger Yang
  0 siblings, 0 replies; 4+ messages in thread
From: Tiger Yang @ 2010-07-16  3:23 UTC (permalink / raw)
  To: ocfs2-devel

Setting the acl while creating a new inode depends on
the error codes of posix_acl_create_masq. This patch fix
a issue of overwriting the error codes of it.

Reported-by: Pawel Zawora <pzawora@gmail.com>
Cc: <stable@kernel.org> [ .33, .34 ]
Signed-off-by: Tiger Yang <tiger.yang@oracle.com>
---
 fs/ocfs2/acl.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/fs/ocfs2/acl.c b/fs/ocfs2/acl.c
index da70229..5a21778 100644
--- a/fs/ocfs2/acl.c
+++ b/fs/ocfs2/acl.c
@@ -344,7 +344,7 @@ int ocfs2_init_acl(handle_t *handle,
 {
 	struct ocfs2_super *osb = OCFS2_SB(inode->i_sb);
 	struct posix_acl *acl = NULL;
-	int ret = 0;
+	int ret = 0, ret2;
 	mode_t mode;
 
 	if (!S_ISLNK(inode->i_mode)) {
@@ -381,7 +381,12 @@ 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);
+				ret = ret2;
+				goto cleanup;
+			}
 			if (ret > 0) {
 				ret = ocfs2_set_acl(handle, inode,
 						    di_bh, ACL_TYPE_ACCESS,
-- 
1.5.2.3

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

* [Ocfs2-devel] [PATCH 1/1 v2] ocfs2: do not overwrite error codes in ocfs2_init_acl
@ 2010-07-16  5:09 Tiger Yang
  2010-07-16  5:53 ` Tao Ma
  2010-08-07 18:38 ` Joel Becker
  0 siblings, 2 replies; 4+ messages in thread
From: Tiger Yang @ 2010-07-16  5:09 UTC (permalink / raw)
  To: ocfs2-devel


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ocfs2-do-not-overwrite-error-codes-in-ocfs2_init_ac.patch
Type: text/x-patch
Size: 1408 bytes
Desc: not available
Url : http://oss.oracle.com/pipermail/ocfs2-devel/attachments/20100716/8e8d0729/attachment.bin 

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

* [Ocfs2-devel] [PATCH 1/1 v2] ocfs2: do not overwrite error codes in ocfs2_init_acl
  2010-07-16  5:09 [Ocfs2-devel] [PATCH 1/1 v2] ocfs2: do not overwrite error codes in ocfs2_init_acl Tiger Yang
@ 2010-07-16  5:53 ` Tao Ma
  2010-08-07 18:38 ` Joel Becker
  1 sibling, 0 replies; 4+ messages in thread
From: Tao Ma @ 2010-07-16  5:53 UTC (permalink / raw)
  To: ocfs2-devel

ack

On 07/16/2010 01:09 PM, Tiger Yang wrote:
>
>
> _______________________________________________
> 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

* [Ocfs2-devel] [PATCH 1/1 v2] ocfs2: do not overwrite error codes in ocfs2_init_acl
  2010-07-16  5:09 [Ocfs2-devel] [PATCH 1/1 v2] ocfs2: do not overwrite error codes in ocfs2_init_acl Tiger Yang
  2010-07-16  5:53 ` Tao Ma
@ 2010-08-07 18:38 ` Joel Becker
  1 sibling, 0 replies; 4+ messages in thread
From: Joel Becker @ 2010-08-07 18:38 UTC (permalink / raw)
  To: ocfs2-devel

On Fri, Jul 16, 2010 at 01:09:50PM +0800, Tiger Yang wrote:

> >From d70af04aae44afc7bd2ea40a12da03a08fd3e5c1 Mon Sep 17 00:00:00 2001
> From: Tiger Yang <tiger.yang@oracle.com>
> Date: Fri, 16 Jul 2010 11:21:23 +0800
> Subject: [PATCH 1/1 v2] ocfs2: do not overwrite error codes in ocfs2_init_acl
> 
> Setting the acl while creating a new inode depends on
> the error codes of posix_acl_create_masq. This patch fix
> a issue of overwriting the error codes of it.
> 
> Reported-by: Pawel Zawora <pzawora@gmail.com>
> Cc: <stable@kernel.org> [ .33, .34 ]
> Signed-off-by: Tiger Yang <tiger.yang@oracle.com>

This patch is now in the fixes branch of ocfs2.git.

Joel

-- 

"Up and down that road in our worn out shoes,
 Talking bout good things and singing the blues."

Joel Becker
Consulting Software Developer
Oracle
E-mail: joel.becker at oracle.com
Phone: (650) 506-8127

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

end of thread, other threads:[~2010-08-07 18:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-16  5:09 [Ocfs2-devel] [PATCH 1/1 v2] ocfs2: do not overwrite error codes in ocfs2_init_acl Tiger Yang
2010-07-16  5:53 ` Tao Ma
2010-08-07 18:38 ` Joel Becker
  -- strict thread matches above, loose matches on Subject: below --
2010-07-16  3:23 Tiger Yang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).