From mboxrd@z Thu Jan 1 00:00:00 1970 From: Evgeniy Dushistov Subject: [PATCH 4/4]: ufs2 tindirect truncate fix Date: Sat, 10 Mar 2007 12:32:55 +0300 Message-ID: <20070310093255.GA822@rain> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-fsdevel@vger.kernel.org To: akpm@linux-foundation.org, linux-kernel@vger.kernel.org Return-path: Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org During modification of code to support UFS2 writing, the case with "three indirect" blocks in truncate path was missed, this patch fixes this situation. Signed-off-by: Evgeniy Dushistov --- Index: linux-2.6.21-rc3-git6/fs/ufs/truncate.c =================================================================== --- linux-2.6.21-rc3-git6.orig/fs/ufs/truncate.c +++ linux-2.6.21-rc3-git6/fs/ufs/truncate.c @@ -348,7 +348,7 @@ static int ufs_trunc_tindirect(struct in } for (i = tindirect_block ; i < uspi->s_apb ; i++) { - tind = ubh_get_addr32 (tind_bh, i); + tind = ubh_get_data_ptr(uspi, tind_bh, i); retry |= ufs_trunc_dindirect(inode, UFS_NDADDR + uspi->s_apb + ((i + 1) << uspi->s_2apbshift), tind); ubh_mark_buffer_dirty(tind_bh); -- /Evgeniy