diff options
Diffstat (limited to 'fs/ext4/file.c')
-rw-r--r-- | fs/ext4/file.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/fs/ext4/file.c b/fs/ext4/file.c index 8c7642a00054..782eecb57e43 100644 --- a/fs/ext4/file.c +++ b/fs/ext4/file.c | |||
@@ -211,9 +211,9 @@ static int ext4_file_open(struct inode * inode, struct file * filp) | |||
211 | } | 211 | } |
212 | 212 | ||
213 | /* | 213 | /* |
214 | * ext4_llseek() copied from generic_file_llseek() to handle both | 214 | * ext4_llseek() handles both block-mapped and extent-mapped maxbytes values |
215 | * block-mapped and extent-mapped maxbytes values. This should | 215 | * by calling generic_file_llseek_size() with the appropriate maxbytes |
216 | * otherwise be identical with generic_file_llseek(). | 216 | * value for each. |
217 | */ | 217 | */ |
218 | loff_t ext4_llseek(struct file *file, loff_t offset, int origin) | 218 | loff_t ext4_llseek(struct file *file, loff_t offset, int origin) |
219 | { | 219 | { |
@@ -225,7 +225,8 @@ loff_t ext4_llseek(struct file *file, loff_t offset, int origin) | |||
225 | else | 225 | else |
226 | maxbytes = inode->i_sb->s_maxbytes; | 226 | maxbytes = inode->i_sb->s_maxbytes; |
227 | 227 | ||
228 | return generic_file_llseek_size(file, offset, origin, maxbytes); | 228 | return generic_file_llseek_size(file, offset, origin, |
229 | maxbytes, i_size_read(inode)); | ||
229 | } | 230 | } |
230 | 231 | ||
231 | const struct file_operations ext4_file_operations = { | 232 | const struct file_operations ext4_file_operations = { |