summaryrefslogtreecommitdiffstats
path: root/fs/exfat/file.c
diff options
context:
space:
mode:
authorArnaldo Carvalho de Melo <acme@redhat.com>2020-07-08 18:49:15 +0200
committerArnaldo Carvalho de Melo <acme@redhat.com>2020-07-08 18:49:15 +0200
commitfacbf0b9820f34f14b54f567862b4a96e910f468 (patch)
treeee65e875e4167dd903f2745cfbf6b2735fd1cd9e /fs/exfat/file.c
parentperf symbols: Add s390 idle functions 'psw_idle' and 'psw_idle_exit' to list ... (diff)
parentMerge tag 'perf-tools-fixes-2020-07-07' of git://git.kernel.org/pub/scm/linux... (diff)
downloadlinux-facbf0b9820f34f14b54f567862b4a96e910f468.tar.xz
linux-facbf0b9820f34f14b54f567862b4a96e910f468.zip
Merge remote-tracking branch 'torvalds/master' into perf/core
To pick up fixes and move perf/core forward, minor conflict as perf_evlist__add_dummy() lost its 'perf_' prefix as it operates on a 'struct evlist', not on a 'struct perf_evlist', i.e. its tools/perf/ specific, it is not in libperf. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'fs/exfat/file.c')
-rw-r--r--fs/exfat/file.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/fs/exfat/file.c b/fs/exfat/file.c
index fce03f318787..3b7fea465fd4 100644
--- a/fs/exfat/file.c
+++ b/fs/exfat/file.c
@@ -6,6 +6,7 @@
#include <linux/slab.h>
#include <linux/cred.h>
#include <linux/buffer_head.h>
+#include <linux/blkdev.h>
#include "exfat_raw.h"
#include "exfat_fs.h"
@@ -346,12 +347,28 @@ out:
return error;
}
+int exfat_file_fsync(struct file *filp, loff_t start, loff_t end, int datasync)
+{
+ struct inode *inode = filp->f_mapping->host;
+ int err;
+
+ err = __generic_file_fsync(filp, start, end, datasync);
+ if (err)
+ return err;
+
+ err = sync_blockdev(inode->i_sb->s_bdev);
+ if (err)
+ return err;
+
+ return blkdev_issue_flush(inode->i_sb->s_bdev, GFP_KERNEL);
+}
+
const struct file_operations exfat_file_operations = {
.llseek = generic_file_llseek,
.read_iter = generic_file_read_iter,
.write_iter = generic_file_write_iter,
.mmap = generic_file_mmap,
- .fsync = generic_file_fsync,
+ .fsync = exfat_file_fsync,
.splice_read = generic_file_splice_read,
.splice_write = iter_file_splice_write,
};