Skip to content

Commit

Permalink
[PATCH] UFS: inode->i_sem is not released in error path
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Evgeniy Polyakov authored and Linus Torvalds committed Jan 9, 2006
1 parent ac34dd0 commit 15b2fe3
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fs/ufs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -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++;
Expand Down

0 comments on commit 15b2fe3

Please sign in to comment.