提交 15b2fe39 编写于 作者: E Evgeniy Polyakov 提交者: Linus Torvalds

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

Signed-off-by: NEvgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: <stable@kernel.org>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 ac34dd05
......@@ -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++;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册