summaryrefslogtreecommitdiff
path: root/fs/ocfs2/inode.c
diff options
context:
space:
mode:
authorMark Fasheh <mfasheh@suse.com>2009-12-07 13:15:40 -0800
committerJoel Becker <joel.becker@oracle.com>2010-03-24 17:32:15 -0700
commit2bf6bd0fd8adeaeb9eaa8eeba3692e653f585fba (patch)
tree9510996ddb640cf8cda7ca3761898f9ed794f2ba /fs/ocfs2/inode.c
parentf00c79244ac0e7988192c6a023e2afd0b6b3cc96 (diff)
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/inode.c')
-rw-r--r--fs/ocfs2/inode.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ocfs2/inode.c b/fs/ocfs2/inode.c
index 7cc0b4665d5e..62b4743fb6f1 100644
--- a/fs/ocfs2/inode.c
+++ b/fs/ocfs2/inode.c
@@ -1096,6 +1096,10 @@ void ocfs2_clear_inode(struct inode *inode)
ocfs2_mark_lockres_freeing(&oi->ip_inode_lockres);
ocfs2_mark_lockres_freeing(&oi->ip_open_lockres);
+ ocfs2_resv_discard(&OCFS2_SB(inode->i_sb)->osb_la_resmap,
+ &oi->ip_la_data_resv);
+ ocfs2_resv_init_once(&oi->ip_la_data_resv);
+
/* We very well may get a clear_inode before all an inodes
* metadata has hit disk. Of course, we can't drop any cluster
* locks until the journal has finished with it. The only