|
|
| version 1.691, 2007/03/03 02:57:44 | version 1.692, 2007/03/10 02:56:10 |
|---|---|
| Line 1257 xfs_inactive_free_eofblocks( | Line 1257 xfs_inactive_free_eofblocks( |
| * do that within a transaction. | * do that within a transaction. |
| */ | */ |
| xfs_ilock(ip, XFS_IOLOCK_EXCL); | xfs_ilock(ip, XFS_IOLOCK_EXCL); |
| xfs_itruncate_start(ip, XFS_ITRUNC_DEFINITE, | error = xfs_itruncate_start(ip, XFS_ITRUNC_DEFINITE, |
| ip->i_d.di_size); | ip->i_d.di_size); |
| if (error) { | |
| xfs_iunlock(ip, XFS_IOLOCK_EXCL); | |
| return error; | |
| } | |
| error = xfs_trans_reserve(tp, 0, | error = xfs_trans_reserve(tp, 0, |
| XFS_ITRUNCATE_LOG_RES(mp), | XFS_ITRUNCATE_LOG_RES(mp), |
| Line 1674 xfs_inactive( | Line 1678 xfs_inactive( |
| */ | */ |
| xfs_ilock(ip, XFS_IOLOCK_EXCL); | xfs_ilock(ip, XFS_IOLOCK_EXCL); |
| xfs_itruncate_start(ip, XFS_ITRUNC_DEFINITE, 0); | error = xfs_itruncate_start(ip, XFS_ITRUNC_DEFINITE, 0); |
| if (error) { | |
| xfs_iunlock(ip, XFS_IOLOCK_EXCL); | |
| return VN_INACTIVE_CACHE; | |
| } | |
| error = xfs_trans_reserve(tp, 0, | error = xfs_trans_reserve(tp, 0, |
| XFS_ITRUNCATE_LOG_RES(mp), | XFS_ITRUNCATE_LOG_RES(mp), |
| Line 4338 xfs_free_file_space( | Line 4346 xfs_free_file_space( |
| if (VN_CACHED(vp) != 0) { | if (VN_CACHED(vp) != 0) { |
| xfs_inval_cached_trace(&ip->i_iocore, ioffset, -1, | xfs_inval_cached_trace(&ip->i_iocore, ioffset, -1, |
| ctooff(offtoct(ioffset)), -1); | ctooff(offtoct(ioffset)), -1); |
| bhv_vop_flushinval_pages(vp, ctooff(offtoct(ioffset)), | error = bhv_vop_flushinval_pages(vp, ctooff(offtoct(ioffset)), |
| -1, FI_REMAPF_LOCKED); | -1, FI_REMAPF_LOCKED); |
| if (error) | |
| goto out_unlock_iolock; | |
| } | } |
| /* | /* |