diff options
Diffstat (limited to 'fs/open.c')
-rw-r--r-- | fs/open.c | 8 |
1 files changed, 0 insertions, 8 deletions
@@ -284,14 +284,6 @@ int do_fallocate(struct file *file, int mode, loff_t offset, loff_t len) | |||
284 | if (((offset + len) > inode->i_sb->s_maxbytes) || ((offset + len) < 0)) | 284 | if (((offset + len) > inode->i_sb->s_maxbytes) || ((offset + len) < 0)) |
285 | return -EFBIG; | 285 | return -EFBIG; |
286 | 286 | ||
287 | /* | ||
288 | * There is no need to overlap collapse range with EOF, in which case | ||
289 | * it is effectively a truncate operation | ||
290 | */ | ||
291 | if ((mode & FALLOC_FL_COLLAPSE_RANGE) && | ||
292 | (offset + len >= i_size_read(inode))) | ||
293 | return -EINVAL; | ||
294 | |||
295 | if (!file->f_op->fallocate) | 287 | if (!file->f_op->fallocate) |
296 | return -EOPNOTSUPP; | 288 | return -EOPNOTSUPP; |
297 | 289 | ||