From f391475812ba39afa322c835217ffe936f5e754a Mon Sep 17 00:00:00 2001 From: Evgeniy Dushistov Date: Sun, 25 Jun 2006 05:47:28 -0700 Subject: [PATCH] ufs: missed brelse and wrong baseblk This patch fixes two bugs, which introduced by previous patches: 1) Missed "brelse" 2) Sometimes "baseblk" may be wrongly calculated, if i_size is equal to zero, which lead infinite cycle in "mpage_writepages". Signed-off-by: Evgeniy Dushistov Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- fs/ufs/inode.c | 1 + 1 file changed, 1 insertion(+) (limited to 'fs/ufs/inode.c') diff --git a/fs/ufs/inode.c b/fs/ufs/inode.c index 72282043a8f..01c5f19cbab 100644 --- a/fs/ufs/inode.c +++ b/fs/ufs/inode.c @@ -175,6 +175,7 @@ ufs_clear_frags(struct inode *inode, sector_t beg, for (++beg; beg < end; ++beg) { bh = sb_getblk(inode->i_sb, beg); ufs_clear_frag(inode, bh); + brelse(bh); } return res; } -- cgit v1.2.3