summaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/file.c
diff options
context:
space:
mode:
authorMark Fasheh2009-12-07 22:15:40 +0100
committerJoel Becker2010-05-06 03:17:30 +0200
commit4fe370afaae49c57619bb0bedb75de7e7c168308 (patch)
tree7b2752fc9616578e9e3baa659e6c724b301d26c5 /fs/ocfs2/file.c
parentocfs2: allocation reservations (diff)
downloadkernel-qcow2-linux-4fe370afaae49c57619bb0bedb75de7e7c168308.tar.gz
kernel-qcow2-linux-4fe370afaae49c57619bb0bedb75de7e7c168308.tar.xz
kernel-qcow2-linux-4fe370afaae49c57619bb0bedb75de7e7c168308.zip
ocfs2: use allocation reservations during file write
Add a per-inode reservations structure and pass it through to the reservations code. Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/file.c')
-rw-r--r--fs/ocfs2/file.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index e6e8281628a6..19d16f2ef81e 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -483,6 +483,9 @@ static int ocfs2_truncate_file(struct inode *inode,
down_write(&OCFS2_I(inode)->ip_alloc_sem);
+ ocfs2_resv_discard(&osb->osb_la_resmap,
+ &OCFS2_I(inode)->ip_la_data_resv);
+
/*
* The inode lock forced other nodes to sync and drop their
* pages, which (correctly) happens even if we have a truncate