[PATCH] UFS: inode->i_sem is not released in error path
[linux-2.6.git] / fs / ufs / super.c
index 54828eb..2ba11a9 100644 (file)
@@ -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++;