Skip to contentSkip to conversation

fix locking mistake

PATCH New Josef Whiter 3 participants 3 messages Feb 20, 2007 – Feb 21, 2007 GFS2 file system

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix locking mistake

This patch fixes a locking mistake in the quota code, we do a mutex_lock instead of a mutex_unlock.

fs/gfs2/quota.c renamed from fs/gfs2/quota.c.josef +1 -1
@@ -279,7 +279,7 @@ static int bh_get(struct gfs2_quota_data
 		(bh->b_data + sizeof(struct gfs2_meta_header) +
 		 offset * sizeof(struct gfs2_quota_change));
 
-	mutex_lock(&sdp->sd_quota_mutex);
+	mutex_unlock(&sdp->sd_quota_mutex);
 
 	return 0;
 
#1 lore raw

PATCH 1/1 fix locking mistake

Quoted 8 lines · On Tue, 20 Feb 2007 00:03:29 -0500 Josef Whiter <[email protected]> wrote:

This patch fixes a locking mistake in the quota code, we do a mutex_lock instead of a mutex_unlock.

fs/gfs2/quota.c static int bh_get(struct gfs2_quota_data · line 285

Quoted 8 lines
fs/gfs2/quota.c renamed from fs/gfs2/quota.c.josef +1 -1
@@ -279,7 +279,7 @@ static int bh_get(struct gfs2_quota_data
 		(bh->b_data + sizeof(struct gfs2_meta_header) +
 		 offset * sizeof(struct gfs2_quota_change));
 
-	mutex_lock(&sdp->sd_quota_mutex);
+	mutex_unlock(&sdp->sd_quota_mutex);
 
 	return 0;
 

whaaa? There's no way that any of that code has ever been executed, surely??

Oh well, I'll tag this for consideration by the -stable team.

#2 lore raw

PATCH 1/1 fix locking mistake

In reply to Josef Whiter

Hi,

Now in the gfs2 git tree, sorry for the delay. Thanks,

Steve.

Quoted 17 lines · Josef Whiter

This patch fixes a locking mistake in the quota code, we do a mutex_lock instead of a mutex_unlock.

fs/gfs2/quota.c renamed from fs/gfs2/quota.c.josef +1 -1
@@ -279,7 +279,7 @@ static int bh_get(struct gfs2_quota_data
 		(bh->b_data + sizeof(struct gfs2_meta_header) +
 		 offset * sizeof(struct gfs2_quota_change));
 
-	mutex_lock(&sdp->sd_quota_mutex);
+	mutex_unlock(&sdp->sd_quota_mutex);
 
 	return 0;