summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_vnodeops.c
diff options
context:
space:
mode:
authorDavid Chinner <dgc@sgi.com>2007-07-19 08:28:30 +0200
committerTim Shimmin <tes@chook.melbourne.sgi.com>2007-07-19 11:51:46 +0200
commit91ebecc74eeeeea0a2aa50bf1964ec2214a229c9 (patch)
treea81a48c59c46c7fedce5532afb6fd2ce648201dd /fs/xfs/xfs_vnodeops.c
parent[XFS] Implement ->page_mkwrite in XFS. (diff)
downloadlinux-91ebecc74eeeeea0a2aa50bf1964ec2214a229c9.tar.xz
linux-91ebecc74eeeeea0a2aa50bf1964ec2214a229c9.zip
[XFS] Allow punching holes to free space when at ENOSPC
Make the free file space transaction able to dip into the reserved blocks to ensure that we can successfully free blocks when the filesystem is at ENOSPC. SGI-PV: 967788 SGI-Modid: xfs-linux-melb:xfs-kern:29167a Signed-off-by: David Chinner <dgc@sgi.com> Signed-off-by: Vlad Apostolov <vapo@sgi.com> Signed-off-by: Tim Shimmin <tes@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_vnodeops.c')
-rw-r--r--fs/xfs/xfs_vnodeops.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/xfs/xfs_vnodeops.c b/fs/xfs/xfs_vnodeops.c
index 79b522779aa4..401cb00a55d6 100644
--- a/fs/xfs/xfs_vnodeops.c
+++ b/fs/xfs/xfs_vnodeops.c
@@ -4434,9 +4434,12 @@ xfs_free_file_space(
while (!error && !done) {
/*
- * allocate and setup the transaction
+ * allocate and setup the transaction. Allow this
+ * transaction to dip into the reserve blocks to ensure
+ * the freeing of the space succeeds at ENOSPC.
*/
tp = xfs_trans_alloc(mp, XFS_TRANS_DIOSTRAT);
+ tp->t_flags |= XFS_TRANS_RESERVE;
error = xfs_trans_reserve(tp,
resblks,
XFS_WRITE_LOG_RES(mp),