summaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@linux.intel.com>2014-02-14 11:11:18 -0800
committerH. Peter Anvin <hpa@linux.intel.com>2014-02-14 11:11:18 -0800
commit31fce91e7afc25c666276f65f019bc13fd27e216 (patch)
tree24f9673614a98a06fd8f4254c63b306dddd5aac6 /include/linux/fs.h
parent4640c7ee9b8953237d05a61ea3ea93981d1bc961 (diff)
parent09503379dc99535b1bbfa51aa1aeef340f5d82ec (diff)
downloadop-kernel-dev-31fce91e7afc25c666276f65f019bc13fd27e216.zip
op-kernel-dev-31fce91e7afc25c666276f65f019bc13fd27e216.tar.gz
Merge remote-tracking branch 'efi/urgent' into x86/urgent
There have been reports of EFI crashes since -rc1. The following two commits fix known issues. * Fix boot failure on 32-bit EFI due to the recent EFI memmap changes merged during the merge window - Borislav Petkov * Avoid a crash during efi_bgrt_init() by detecting invalid BGRT headers based on the 'status' field. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index d79678c..6082956 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2274,7 +2274,13 @@ extern int filemap_fdatawrite_range(struct address_space *mapping,
extern int vfs_fsync_range(struct file *file, loff_t start, loff_t end,
int datasync);
extern int vfs_fsync(struct file *file, int datasync);
-extern int generic_write_sync(struct file *file, loff_t pos, loff_t count);
+static inline int generic_write_sync(struct file *file, loff_t pos, loff_t count)
+{
+ if (!(file->f_flags & O_DSYNC) && !IS_SYNC(file->f_mapping->host))
+ return 0;
+ return vfs_fsync_range(file, pos, pos + count - 1,
+ (file->f_flags & __O_SYNC) ? 0 : 1);
+}
extern void emergency_sync(void);
extern void emergency_remount(void);
#ifdef CONFIG_BLOCK
OpenPOWER on IntegriCloud