unlock i_mutex in error path
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
Signed-off-by Dan Carpenter <[email protected]>
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);