diff options
Diffstat (limited to 'fs/ext3/file.c')
-rw-r--r-- | fs/ext3/file.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/fs/ext3/file.c b/fs/ext3/file.c index 3be1e0689c9a..5b49704b231b 100644 --- a/fs/ext3/file.c +++ b/fs/ext3/file.c | |||
@@ -33,6 +33,10 @@ | |||
33 | */ | 33 | */ |
34 | static int ext3_release_file (struct inode * inode, struct file * filp) | 34 | static int ext3_release_file (struct inode * inode, struct file * filp) |
35 | { | 35 | { |
36 | if (EXT3_I(inode)->i_state & EXT3_STATE_FLUSH_ON_CLOSE) { | ||
37 | filemap_flush(inode->i_mapping); | ||
38 | EXT3_I(inode)->i_state &= ~EXT3_STATE_FLUSH_ON_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)) |
@@ -112,7 +116,7 @@ const struct file_operations ext3_file_operations = { | |||
112 | .write = do_sync_write, | 116 | .write = do_sync_write, |
113 | .aio_read = generic_file_aio_read, | 117 | .aio_read = generic_file_aio_read, |
114 | .aio_write = ext3_file_write, | 118 | .aio_write = ext3_file_write, |
115 | .ioctl = ext3_ioctl, | 119 | .unlocked_ioctl = ext3_ioctl, |
116 | #ifdef CONFIG_COMPAT | 120 | #ifdef CONFIG_COMPAT |
117 | .compat_ioctl = ext3_compat_ioctl, | 121 | .compat_ioctl = ext3_compat_ioctl, |
118 | #endif | 122 | #endif |