diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 20:47:36 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-10 20:47:36 +0200 |
commit | 8196867c74890ccdf40a2b5e3e173597fbc4f9ac (patch) | |
tree | 3bb2df18233327ed9fd3bdd3da2f84cefe7d5611 /fs/omfs/file.c | |
parent | Merge branch 'for-linus' of git://git.infradead.org/users/eparis/notify (diff) | |
parent | omfs: fix uninitialized variable warning (diff) | |
download | linux-8196867c74890ccdf40a2b5e3e173597fbc4f9ac.tar.xz linux-8196867c74890ccdf40a2b5e3e173597fbc4f9ac.zip |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bcopeland/omfs
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/bcopeland/omfs:
omfs: fix uninitialized variable warning
omfs: sanity check cluster size
omfs: refuse to mount if bitmap pointer is obviously wrong
omfs: check bounds on block numbers before passing to sb_bread
omfs: fix memory leak
Diffstat (limited to 'fs/omfs/file.c')
-rw-r--r-- | fs/omfs/file.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/omfs/file.c b/fs/omfs/file.c index 5542c284dc1c..8a6d34fa668a 100644 --- a/fs/omfs/file.c +++ b/fs/omfs/file.c @@ -50,7 +50,7 @@ int omfs_shrink_inode(struct inode *inode) if (inode->i_size != 0) goto out; - bh = sb_bread(inode->i_sb, clus_to_blk(sbi, next)); + bh = omfs_bread(inode->i_sb, next); if (!bh) goto out; @@ -90,7 +90,7 @@ int omfs_shrink_inode(struct inode *inode) if (next == ~0) break; - bh = sb_bread(inode->i_sb, clus_to_blk(sbi, next)); + bh = omfs_bread(inode->i_sb, next); if (!bh) goto out; oe = (struct omfs_extent *) (&bh->b_data[OMFS_EXTENT_CONT]); @@ -222,7 +222,7 @@ static int omfs_get_block(struct inode *inode, sector_t block, struct buffer_head *bh; sector_t next, offset; int ret; - u64 new_block; + u64 uninitialized_var(new_block); u32 max_extents; int extent_count; struct omfs_extent *oe; @@ -232,7 +232,7 @@ static int omfs_get_block(struct inode *inode, sector_t block, int remain; ret = -EIO; - bh = sb_bread(inode->i_sb, clus_to_blk(sbi, inode->i_ino)); + bh = omfs_bread(inode->i_sb, inode->i_ino); if (!bh) goto out; @@ -265,7 +265,7 @@ static int omfs_get_block(struct inode *inode, sector_t block, break; brelse(bh); - bh = sb_bread(inode->i_sb, clus_to_blk(sbi, next)); + bh = omfs_bread(inode->i_sb, next); if (!bh) goto out; oe = (struct omfs_extent *) (&bh->b_data[OMFS_EXTENT_CONT]); |