Skip to content

Commit

Permalink
ext2: missing unlock in ext2_quota_write()
Browse files Browse the repository at this point in the history
The inode->i_mutex should be unlocked.

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

Signed-off-by: Dan Carpenter <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
  • Loading branch information
error27 authored and jankara committed Apr 27, 2009
1 parent fd1b524 commit a069e9c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/ext2/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1395,8 +1395,10 @@ static ssize_t ext2_quota_write(struct super_block *sb, int type,
blk++;
}
out:
if (len == towrite)
if (len == towrite) {
mutex_unlock(&inode->i_mutex);
return err;
}
if (inode->i_size < off+len-towrite)
i_size_write(inode, off+len-towrite);
inode->i_version++;
Expand Down

0 comments on commit a069e9c

Please sign in to comment.