forked from Minki/linux
[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:
parent
ac34dd0524
commit
15b2fe3931
@ -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++;
|
||||
|
Loading…
Reference in New Issue
Block a user