[PATCH] UFS: inode->i_sem is not released in error path

Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Evgeniy Polyakov 2006-01-08 01:04:51 -08:00 committed by Linus Torvalds
parent ac34dd0524
commit 15b2fe3931
1 changed files with 3 additions and 1 deletions

View File

@ -1296,8 +1296,10 @@ static ssize_t ufs_quota_write(struct super_block *sb, int type,
blk++;
}
out:
if (len == towrite)
if (len == towrite) {
up(&inode->i_sem);
return err;
}
if (inode->i_size < off+len-towrite)
i_size_write(inode, off+len-towrite);
inode->i_version++;