diff --git a/fs/sync.c b/fs/sync.c index ab4c2c44..d104591b 100644 --- a/fs/sync.c +++ b/fs/sync.c @@ -15,9 +15,6 @@ #include #include "internal.h" -bool fsync_enabled = false; -module_param(fsync_enabled, bool, 0755); - #define VALID_FLAGS (SYNC_FILE_RANGE_WAIT_BEFORE|SYNC_FILE_RANGE_WRITE| \ SYNC_FILE_RANGE_WAIT_AFTER) @@ -211,9 +208,6 @@ int vfs_fsync_range(struct file *file, struct dentry *dentry, loff_t start, struct address_space *mapping; int err, ret; - if (!fsync_enabled) - return 0; - /* * Get mapping and operations from the file in case we have * as file, or get the default values for them in case we @@ -264,9 +258,6 @@ EXPORT_SYMBOL(vfs_fsync_range); */ int vfs_fsync(struct file *file, struct dentry *dentry, int datasync) { - if (!fsync_enabled) - return 0; - return vfs_fsync_range(file, dentry, 0, LLONG_MAX, datasync); } EXPORT_SYMBOL(vfs_fsync); @@ -276,9 +267,6 @@ static int do_fsync(unsigned int fd, int datasync) struct file *file; int ret = -EBADF; - if (!fsync_enabled) - return 0; - file = fget(fd); if (file) { ret = vfs_fsync(file, file->f_path.dentry, datasync); @@ -289,17 +277,11 @@ static int do_fsync(unsigned int fd, int datasync) SYSCALL_DEFINE1(fsync, unsigned int, fd) { - if (!fsync_enabled) - return 0; - return do_fsync(fd, 0); } SYSCALL_DEFINE1(fdatasync, unsigned int, fd) { - if (!fsync_enabled) - return 0; - return do_fsync(fd, 1); } @@ -313,9 +295,6 @@ SYSCALL_DEFINE1(fdatasync, unsigned int, fd) */ int generic_write_sync(struct file *file, loff_t pos, loff_t count) { - if (!fsync_enabled) - return 0; - if (!(file->f_flags & O_SYNC) && !IS_SYNC(file->f_mapping->host)) return 0; return vfs_fsync_range(file, file->f_path.dentry, pos, @@ -379,9 +358,6 @@ SYSCALL_DEFINE(sync_file_range)(int fd, loff_t offset, loff_t nbytes, int fput_needed; umode_t i_mode; - if (!fsync_enabled) - return 0; - ret = -EINVAL; if (flags & ~VALID_FLAGS) goto out;