Commit 67e0d5c7 authored by Evgeniy Polyakov's avatar Evgeniy Polyakov Committed by Chris Wright

[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>
akpm: obviously correct, OK for -stable immediately.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarChris Wright <chrisw@sous-sol.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent b43a04de
...@@ -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