diff options
Diffstat (limited to 'fs/ext3/file.c')
| -rw-r--r-- | fs/ext3/file.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/ext3/file.c b/fs/ext3/file.c index 5ad8cf0292df..98e78345ead9 100644 --- a/fs/ext3/file.c +++ b/fs/ext3/file.c | |||
| @@ -36,7 +36,11 @@ static int ext3_release_file (struct inode * inode, struct file * filp) | |||
| 36 | /* if we are the last writer on the inode, drop the block reservation */ | 36 | /* if we are the last writer on the inode, drop the block reservation */ |
| 37 | if ((filp->f_mode & FMODE_WRITE) && | 37 | if ((filp->f_mode & FMODE_WRITE) && |
| 38 | (atomic_read(&inode->i_writecount) == 1)) | 38 | (atomic_read(&inode->i_writecount) == 1)) |
| 39 | { | ||
| 40 | down(&EXT3_I(inode)->truncate_sem); | ||
| 39 | ext3_discard_reservation(inode); | 41 | ext3_discard_reservation(inode); |
| 42 | up(&EXT3_I(inode)->truncate_sem); | ||
| 43 | } | ||
| 40 | if (is_dx(inode) && filp->private_data) | 44 | if (is_dx(inode) && filp->private_data) |
| 41 | ext3_htree_free_dir_info(filp->private_data); | 45 | ext3_htree_free_dir_info(filp->private_data); |
| 42 | 46 | ||
