From: Adrian Bunk <bunk@stusta.de>
To: Andrew Morton <akpm@osdl.org>
Cc: bfennema@falcon.csc.calpoly.edu, linux_udf@hpesjro.fc.hp.com,
linux-kernel@vger.kernel.org
Subject: [2.6 patch] fs/udf/inode.c: fix a check after use
Date: Wed, 13 Apr 2005 04:17:37 +0200 [thread overview]
Message-ID: <20050413021737.GR3631@stusta.de> (raw)
This patch fixes a check after use found by the Coverity checker.
Signed-off-by: Adrian Bunk <bunk@fs.tum.de>
---
This patch was already sent on:
- 27 Mar 2005
--- linux-2.6.12-rc1-mm1-full/fs/udf/inode.c.old 2005-03-23 05:12:25.000000000 +0100
+++ linux-2.6.12-rc1-mm1-full/fs/udf/inode.c 2005-03-23 05:12:53.000000000 +0100
@@ -1948,28 +1948,30 @@
udf_release_data(obh);
return (elen >> 30);
}
int8_t inode_bmap(struct inode *inode, int block, kernel_lb_addr *bloc, uint32_t *extoffset,
kernel_lb_addr *eloc, uint32_t *elen, uint32_t *offset, struct buffer_head **bh)
{
- uint64_t lbcount = 0, bcount = (uint64_t)block << inode->i_sb->s_blocksize_bits;
+ uint64_t lbcount = 0, bcount;
int8_t etype;
if (block < 0)
{
printk(KERN_ERR "udf: inode_bmap: block < 0\n");
return -1;
}
if (!inode)
{
printk(KERN_ERR "udf: inode_bmap: NULL inode\n");
return -1;
}
+ bcount = (uint64_t)block << inode->i_sb->s_blocksize_bits;
+
*extoffset = 0;
*elen = 0;
*bloc = UDF_I_LOCATION(inode);
do
{
if ((etype = udf_next_aext(inode, bloc, extoffset, eloc, elen, bh, 1)) == -1)
next reply other threads:[~2005-04-13 2:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-04-13 2:17 Adrian Bunk [this message]
2005-04-13 3:00 ` Al Viro
-- strict thread matches above, loose matches on Subject: below --
2005-03-27 20:46 Adrian Bunk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050413021737.GR3631@stusta.de \
--to=bunk@stusta.de \
--cc=akpm@osdl.org \
--cc=bfennema@falcon.csc.calpoly.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux_udf@hpesjro.fc.hp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome