Commit 15b2fe39 authored by Evgeniy Polyakov's avatar Evgeniy Polyakov Committed by Linus Torvalds

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

Signed-off-by: default avatarEvgeniy Polyakov <johnpol@2ka.mipt.ru>
Cc: <stable@kernel.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent ac34dd05
...@@ -1296,8 +1296,10 @@ static ssize_t ufs_quota_write(struct super_block *sb, int type, ...@@ -1296,8 +1296,10 @@ static ssize_t ufs_quota_write(struct super_block *sb, int type,
blk++; blk++;
} }
out: out:
if (len == towrite) if (len == towrite) {
up(&inode->i_sem);
return err; return err;
}
if (inode->i_size < off+len-towrite) if (inode->i_size < off+len-towrite)
i_size_write(inode, off+len-towrite); i_size_write(inode, off+len-towrite);
inode->i_version++; inode->i_version++;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment