aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEvgeniy Polyakov <johnpol@2ka.mipt.ru>2006-01-03 17:59:19 -0800
committerChris Wright <chrisw@sous-sol.org>2006-01-14 22:15:26 -0800
commit67e0d5c77ea0e0747b1c7bf7455ad274ae9af992 (patch)
treedd013d39d90ff9d50c65f2b445ecd8a47a9d2c7d
parentb43a04de4c0807dbaf5934e7f72c004f4853c4e8 (diff)
downloadlinux-linaro-stable-67e0d5c77ea0e0747b1c7bf7455ad274ae9af992.tar.gz
[PATCH] UFS: inode->i_sem is not released in error path
Signed-off-by: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Cc: <stable@kernel.org> akpm: obviously correct, OK for -stable immediately. Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--fs/ufs/super.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/fs/ufs/super.c b/fs/ufs/super.c
index 54828ebcf1ba..2ba11a9aa995 100644
--- a/fs/ufs/super.c
+++ b/fs/ufs/super.c
@@ -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++;