The patch titled ufs: missed brelse and wrong baseblk has been added to the -mm tree. Its filename is ufs-missed-brelse-and-wrong-baseblk.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: ufs: missed brelse and wrong baseblk From: Evgeniy Dushistov <dushistov@xxxxxxx> 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@xxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- fs/ufs/balloc.c | 12 +++++------- fs/ufs/inode.c | 1 + 2 files changed, 6 insertions(+), 7 deletions(-) diff -puN fs/ufs/balloc.c~ufs-missed-brelse-and-wrong-baseblk fs/ufs/balloc.c --- a/fs/ufs/balloc.c~ufs-missed-brelse-and-wrong-baseblk +++ a/fs/ufs/balloc.c @@ -269,20 +269,17 @@ out: * We can come here from ufs_writepage or ufs_prepare_write, * locked_page is argument of these functions, so we already lock it. */ -static void ufs_change_blocknr(struct inode *inode, unsigned int count, - unsigned int oldb, unsigned int newb, - struct page *locked_page) +static void ufs_change_blocknr(struct inode *inode, unsigned int baseblk, + unsigned int count, unsigned int oldb, + unsigned int newb, struct page *locked_page) { unsigned int blk_per_page = 1 << (PAGE_CACHE_SHIFT - inode->i_blkbits); - sector_t baseblk; struct address_space *mapping = inode->i_mapping; pgoff_t index, cur_index = locked_page->index; unsigned int i, j; struct page *page; struct buffer_head *head, *bh; - baseblk = ((i_size_read(inode) - 1) >> inode->i_blkbits) + 1 - count; - UFSD("ENTER, ino %lu, count %u, oldb %u, newb %u\n", inode->i_ino, count, oldb, newb); @@ -439,7 +436,8 @@ unsigned ufs_new_fragments(struct inode } result = ufs_alloc_fragments (inode, cgno, goal, request, err); if (result) { - ufs_change_blocknr(inode, oldcount, tmp, result, locked_page); + ufs_change_blocknr(inode, fragment - oldcount, oldcount, tmp, + result, locked_page); *p = cpu_to_fs32(sb, result); *err = 0; diff -puN fs/ufs/inode.c~ufs-missed-brelse-and-wrong-baseblk fs/ufs/inode.c --- a/fs/ufs/inode.c~ufs-missed-brelse-and-wrong-baseblk +++ a/fs/ufs/inode.c @@ -175,6 +175,7 @@ ufs_clear_frags(struct inode *inode, sec for (++beg; beg < end; ++beg) { bh = sb_getblk(inode->i_sb, beg); ufs_clear_frag(inode, bh); + brelse(bh); } return res; } _ Patches currently in -mm which might be from dushistov@xxxxxxx are git-jfs.patch ufs-ufs_trunc_indirect-infinite-cycle.patch ufs-right-block-allocation.patch ufs-change-block-number-on-the-fly.patch ufs-directory-and-page-cache-install-aops.patch ufs-directory-and-page-cache-from-blocks-to-pages.patch ufs-wrong-type-cast.patch ufs-not-usual-amounts-of-fragments-per-block.patch ufs-unmark-config_ufs_fs_write-as-broken-mm-tree.patch ufs-easy-debug.patch ufs-little-directory-lookup-optimization.patch ufs-i_blocks-wrong-count.patch ufs-unlock_super-without-lock.patch ufs-zero-metadata.patch ufs-printk-warning-fixes.patch ufs-missed-brelse-and-wrong-baseblk.patch ufs-one-way-to-access-super-block.patch ufs-fsync-implementation.patch ufs-make-fsck-f-happy.patch ufs-ubh_ll_rw_block-cleanup.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html