diff options
Diffstat (limited to 'fs/ext3/file.c')
-rw-r--r-- | fs/ext3/file.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/ext3/file.c b/fs/ext3/file.c index 98e78345ead9..1efefb630ea9 100644 --- a/fs/ext3/file.c +++ b/fs/ext3/file.c | |||
@@ -37,9 +37,9 @@ static int ext3_release_file (struct inode * inode, struct file * filp) | |||
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 | { | 39 | { |
40 | down(&EXT3_I(inode)->truncate_sem); | 40 | mutex_lock(&EXT3_I(inode)->truncate_mutex); |
41 | ext3_discard_reservation(inode); | 41 | ext3_discard_reservation(inode); |
42 | up(&EXT3_I(inode)->truncate_sem); | 42 | mutex_unlock(&EXT3_I(inode)->truncate_mutex); |
43 | } | 43 | } |
44 | if (is_dx(inode) && filp->private_data) | 44 | if (is_dx(inode) && filp->private_data) |
45 | ext3_htree_free_dir_info(filp->private_data); | 45 | ext3_htree_free_dir_info(filp->private_data); |
@@ -105,7 +105,7 @@ force_commit: | |||
105 | return ret; | 105 | return ret; |
106 | } | 106 | } |
107 | 107 | ||
108 | struct file_operations ext3_file_operations = { | 108 | const struct file_operations ext3_file_operations = { |
109 | .llseek = generic_file_llseek, | 109 | .llseek = generic_file_llseek, |
110 | .read = do_sync_read, | 110 | .read = do_sync_read, |
111 | .write = do_sync_write, | 111 | .write = do_sync_write, |
@@ -119,6 +119,8 @@ struct file_operations ext3_file_operations = { | |||
119 | .release = ext3_release_file, | 119 | .release = ext3_release_file, |
120 | .fsync = ext3_sync_file, | 120 | .fsync = ext3_sync_file, |
121 | .sendfile = generic_file_sendfile, | 121 | .sendfile = generic_file_sendfile, |
122 | .splice_read = generic_file_splice_read, | ||
123 | .splice_write = generic_file_splice_write, | ||
122 | }; | 124 | }; |
123 | 125 | ||
124 | struct inode_operations ext3_file_inode_operations = { | 126 | struct inode_operations ext3_file_inode_operations = { |