All of lore.kernel.org
 help / color / mirror / Atom feed
* [Ocfs2-devel] [PATCH] ocfs2/quota: Release lock for error in ocfs2_quota_write.
@ 2009-07-30  8:07 Tao Ma
  2009-07-30 11:07 ` Jan Kara
  2009-07-30 18:17 ` Joel Becker
  0 siblings, 2 replies; 3+ messages in thread
From: Tao Ma @ 2009-07-30  8:07 UTC (permalink / raw)
  To: ocfs2-devel

ocfs2_quota_write needs to release the lock if it fails to
read quota block. So use "goto out" instead of "return err".

Cc: Jan Kara <jack@suse.cz>
Signed-off-by: Tao Ma <tao.ma@oracle.com>
---
 fs/ocfs2/quota_global.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c
index edfa60c..e1c40e3 100644
--- a/fs/ocfs2/quota_global.c
+++ b/fs/ocfs2/quota_global.c
@@ -234,7 +234,7 @@ ssize_t ocfs2_quota_write(struct super_block *sb, int type,
 	}
 	if (err) {
 		mlog_errno(err);
-		return err;
+		goto out;
 	}
 	lock_buffer(bh);
 	if (new)
-- 
1.6.0.4

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

* [Ocfs2-devel] [PATCH] ocfs2/quota: Release lock for error in ocfs2_quota_write.
  2009-07-30  8:07 [Ocfs2-devel] [PATCH] ocfs2/quota: Release lock for error in ocfs2_quota_write Tao Ma
@ 2009-07-30 11:07 ` Jan Kara
  2009-07-30 18:17 ` Joel Becker
  1 sibling, 0 replies; 3+ messages in thread
From: Jan Kara @ 2009-07-30 11:07 UTC (permalink / raw)
  To: ocfs2-devel

On Thu 30-07-09 16:07:10, Tao Ma wrote:
> ocfs2_quota_write needs to release the lock if it fails to
> read quota block. So use "goto out" instead of "return err".
> 
> Cc: Jan Kara <jack@suse.cz>
> Signed-off-by: Tao Ma <tao.ma@oracle.com>
  Ops, you are right.
Acked-by: Jan Kara <jack@suse.cz>

									Honza
> ---
>  fs/ocfs2/quota_global.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c
> index edfa60c..e1c40e3 100644
> --- a/fs/ocfs2/quota_global.c
> +++ b/fs/ocfs2/quota_global.c
> @@ -234,7 +234,7 @@ ssize_t ocfs2_quota_write(struct super_block *sb, int type,
>  	}
>  	if (err) {
>  		mlog_errno(err);
> -		return err;
> +		goto out;
>  	}
>  	lock_buffer(bh);
>  	if (new)
> -- 
> 1.6.0.4
> 
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

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

* [Ocfs2-devel] [PATCH] ocfs2/quota: Release lock for error in ocfs2_quota_write.
  2009-07-30  8:07 [Ocfs2-devel] [PATCH] ocfs2/quota: Release lock for error in ocfs2_quota_write Tao Ma
  2009-07-30 11:07 ` Jan Kara
@ 2009-07-30 18:17 ` Joel Becker
  1 sibling, 0 replies; 3+ messages in thread
From: Joel Becker @ 2009-07-30 18:17 UTC (permalink / raw)
  To: ocfs2-devel

On Thu, Jul 30, 2009 at 04:07:10PM +0800, Tao Ma wrote:
> ocfs2_quota_write needs to release the lock if it fails to
> read quota block. So use "goto out" instead of "return err".
> 
> Cc: Jan Kara <jack@suse.cz>
> Signed-off-by: Tao Ma <tao.ma@oracle.com>

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

Joel

-- 

"Copy from one, it's plagiarism; copy from two, it's research."
        - Wilson Mizner

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

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

end of thread, other threads:[~2009-07-30 18:17 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-30  8:07 [Ocfs2-devel] [PATCH] ocfs2/quota: Release lock for error in ocfs2_quota_write Tao Ma
2009-07-30 11:07 ` Jan Kara
2009-07-30 18:17 ` Joel Becker

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.