FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Cluster Development

 
 
LinkBack Thread Tools
 
Old 02-29-2012, 07:15 PM
Bob Peterson
 
Default Unlock rindex mutex on glock error

Hi,

This patch fixes an error path in function gfs2_rindex_update
that leaves the rindex mutex held.

Regards,

Bob Peterson
Red Hat File Systems

Signed-off-by: Bob Peterson <rpeterso@redhat.com>
--
fs/gfs2/rgrp.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 1446b4e..e09370e 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -699,13 +699,14 @@ int gfs2_rindex_update(struct gfs2_sbd *sdp)
if (!gfs2_glock_is_locked_by_me(gl)) {
error = gfs2_glock_nq_init(gl, LM_ST_SHARED, 0, &ri_gh);
if (error)
- return error;
+ goto out_unlock;
unlock_required = 1;
}
if (!sdp->sd_rindex_uptodate)
error = gfs2_ri_update(ip);
if (unlock_required)
gfs2_glock_dq_uninit(&ri_gh);
+out_unlock:
mutex_unlock(&sdp->sd_rindex_mutex);
}
 
Old 03-01-2012, 09:23 AM
Steven Whitehouse
 
Default Unlock rindex mutex on glock error

Hi,

Now in the -nmw git tree. Thanks,

Steve.

On Wed, 2012-02-29 at 15:15 -0500, Bob Peterson wrote:
> Hi,
>
> This patch fixes an error path in function gfs2_rindex_update
> that leaves the rindex mutex held.
>
> Regards,
>
> Bob Peterson
> Red Hat File Systems
>
> Signed-off-by: Bob Peterson <rpeterso@redhat.com>
> --
> fs/gfs2/rgrp.c | 3 ++-
> 1 files changed, 2 insertions(+), 1 deletions(-)
>
> diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
> index 1446b4e..e09370e 100644
> --- a/fs/gfs2/rgrp.c
> +++ b/fs/gfs2/rgrp.c
> @@ -699,13 +699,14 @@ int gfs2_rindex_update(struct gfs2_sbd *sdp)
> if (!gfs2_glock_is_locked_by_me(gl)) {
> error = gfs2_glock_nq_init(gl, LM_ST_SHARED, 0, &ri_gh);
> if (error)
> - return error;
> + goto out_unlock;
> unlock_required = 1;
> }
> if (!sdp->sd_rindex_uptodate)
> error = gfs2_ri_update(ip);
> if (unlock_required)
> gfs2_glock_dq_uninit(&ri_gh);
> +out_unlock:
> mutex_unlock(&sdp->sd_rindex_mutex);
> }
>
>
 

Thread Tools




All times are GMT. The time now is 02:50 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org