diff options
Diffstat (limited to 'fs/ext4/file.c')
-rw-r--r-- | fs/ext4/file.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ext4/file.c b/fs/ext4/file.c index f731cb545a03..06df8272c639 100644 --- a/fs/ext4/file.c +++ b/fs/ext4/file.c | |||
@@ -33,6 +33,10 @@ | |||
33 | */ | 33 | */ |
34 | static int ext4_release_file(struct inode *inode, struct file *filp) | 34 | static int ext4_release_file(struct inode *inode, struct file *filp) |
35 | { | 35 | { |
36 | if (EXT4_I(inode)->i_state & EXT4_STATE_DA_ALLOC_CLOSE) { | ||
37 | ext4_alloc_da_blocks(inode); | ||
38 | EXT4_I(inode)->i_state &= ~EXT4_STATE_DA_ALLOC_CLOSE; | ||
39 | } | ||
36 | /* if we are the last writer on the inode, drop the block reservation */ | 40 | /* if we are the last writer on the inode, drop the block reservation */ |
37 | if ((filp->f_mode & FMODE_WRITE) && | 41 | if ((filp->f_mode & FMODE_WRITE) && |
38 | (atomic_read(&inode->i_writecount) == 1)) | 42 | (atomic_read(&inode->i_writecount) == 1)) |