Skip to contentSkip to conversation

unlock i_mutex in error path

PATCH New Dan Carpenter 1 participant 1 message Apr 8, 2009 OCFS2

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 unlock i_mutex in error path

There is an error path in ocfs2_quota_write() that doesn't unlock &gqinode->i_mutex(). That seems unintentional.

Found by smatch (http://repo.or.cz/w/smatch.git). Compile tested.

regards,
dan carpenter

fs/ocfs2/quota_global.c +2 -4
@@ -232,10 +232,8 @@
 		err = ocfs2_get_quota_block(gqinode, blk, &bh);
 		ja_type = OCFS2_JOURNAL_ACCESS_CREATE;
 	}
-	if (err) {
-		mlog_errno(err);
-		return err;
-	}
+	if (err) 
+		goto out;
 	lock_buffer(bh);
 	if (new)
 		memset(bh->b_data, 0, sb->s_blocksize);