diff -Naur clean-aa-2.6.x-xfs/fs/xfs/linux-2.6/xfs_iops.c aa-2.6.x-xfs/fs/xfs/linux-2.6/xfs_iops.c --- clean-aa-2.6.x-xfs/fs/xfs/linux/xfs_iops.c 2004-03-25 14:28:07.000000000 +1100 +++ aa-2.6.x-xfs/fs/xfs/linux/xfs_iops.c 2004-04-02 14:26:56.143600992 +1000 @@ -542,16 +542,10 @@ #endif VOP_SETATTR(vp, &vattr, flags, NULL, error); - if (error) - return(-error); /* Positive error up from XFS */ - if (ia_valid & ATTR_SIZE) { - error = vmtruncate(inode, attr->ia_size); - } - - if (!error) { + if (!error) vn_revalidate(vp); - } - return error; + + return -error; } STATIC void diff -Naur clean-aa-2.6.x-xfs/fs/xfs/xfs_vnodeops.c aa-2.6.x-xfs/fs/xfs/xfs_vnodeops.c --- clean-aa-2.6.x-xfs/fs/xfs/xfs_vnodeops.c 2004-03-06 14:13:20.000000000 +1100 +++ aa-2.6.x-xfs/fs/xfs/xfs_vnodeops.c 2004-04-02 15:04:40.620003880 +1000 @@ -683,15 +683,21 @@ if (vap->va_size > ip->i_d.di_size) { code = xfs_igrow_start(ip, vap->va_size, credp); xfs_iunlock(ip, XFS_ILOCK_EXCL); +#if 0 } else if (vap->va_size <= ip->i_d.di_size) { xfs_iunlock(ip, XFS_ILOCK_EXCL); xfs_itruncate_start(ip, XFS_ITRUNC_DEFINITE, (xfs_fsize_t)vap->va_size); code = 0; +#endif } else { xfs_iunlock(ip, XFS_ILOCK_EXCL); code = 0; } + + if (!code) + code = -vmtruncate(&vp->v_inode, vap->va_size); + if (code) { ASSERT(tp == NULL); lock_flags &= ~XFS_ILOCK_EXCL;