[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 <dushistov@mail.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
96710b29e0
commit
f391475812
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user