diff options
Diffstat (limited to 'fs/open.c')
-rw-r--r-- | fs/open.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -295,6 +295,17 @@ int do_fallocate(struct file *file, int mode, loff_t offset, loff_t len) | |||
295 | 295 | ||
296 | sb_start_write(inode->i_sb); | 296 | sb_start_write(inode->i_sb); |
297 | ret = file->f_op->fallocate(file, mode, offset, len); | 297 | ret = file->f_op->fallocate(file, mode, offset, len); |
298 | |||
299 | /* | ||
300 | * Create inotify and fanotify events. | ||
301 | * | ||
302 | * To keep the logic simple always create events if fallocate succeeds. | ||
303 | * This implies that events are even created if the file size remains | ||
304 | * unchanged, e.g. when using flag FALLOC_FL_KEEP_SIZE. | ||
305 | */ | ||
306 | if (ret == 0) | ||
307 | fsnotify_modify(file); | ||
308 | |||
298 | sb_end_write(inode->i_sb); | 309 | sb_end_write(inode->i_sb); |
299 | return ret; | 310 | return ret; |
300 | } | 311 | } |