]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
[PATCH] ufs2: tindirect truncate fix
authorEvgeniy Dushistov <dushistov@mail.ru>
Fri, 16 Mar 2007 21:38:09 +0000 (13:38 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sat, 17 Mar 2007 02:25:03 +0000 (19:25 -0700)
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 <dushistov@mail.ru>
Acked-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/ufs/truncate.c

index 52fb2b59f06ea9e099743b0bbbb19b206ae5273a..79c54c85fb58e8cd937da6fa1e8b46505e26908b 100644 (file)
@@ -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);