Skip to content

Commit

Permalink
[PATCH] ufs2: tindirect truncate fix
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Christoph Hellwig <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
Dushistov authored and Linus Torvalds committed Mar 17, 2007
1 parent 4b25a37 commit 0465fc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ufs/truncate.c
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ static int ufs_trunc_tindirect(struct inode *inode)
}

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);
Expand Down

0 comments on commit 0465fc0

Please sign in to comment.