android_kernel_asus_sm8350/include
Chandan Babu R 323f289a90 iomap: iomap that extends beyond EOF should be marked dirty
From: Dave Chinner <dchinner@redhat.com>

commit 7684e2c4384d5d1f884b01ab8bff2369e4db0bff upstream.

When doing a direct IO that spans the current EOF, and there are
written blocks beyond EOF that extend beyond the current write, the
only metadata update that needs to be done is a file size extension.

However, we don't mark such iomaps as IOMAP_F_DIRTY to indicate that
there is IO completion metadata updates required, and hence we may
fail to correctly sync file size extensions made in IO completion
when O_DSYNC writes are being used and the hardware supports FUA.

Hence when setting IOMAP_F_DIRTY, we need to also take into account
whether the iomap spans the current EOF. If it does, then we need to
mark it dirty so that IO completion will call generic_write_sync()
to flush the inode size update to stable storage correctly.

Fixes: 3460cac1ca ("iomap: Use FUA for pure data O_DSYNC DIO writes")
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
[darrick: removed the ext4 part; they'll handle it separately]
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Acked-by: Darrick J. Wong <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-28 11:03:58 +02:00
..
acpi ACPI: CPPC: Do not prevent CPPC from working in the future 2022-08-25 11:18:15 +02:00
asm-generic asm-generic: sections: refactor memory_intersects 2022-09-05 10:27:43 +02:00
clocksource
crypto crypto: drbg - make reseeding from get_random_bytes() synchronous 2022-06-22 14:11:18 +02:00
drm drm: fix EDID struct for old ARM OABI format 2022-06-14 18:11:31 +02:00
dt-bindings
keys certs: Add EFI_CERT_X509_GUID support for dbx entries 2021-06-30 08:47:55 -04:00
kvm
linux iomap: iomap that extends beyond EOF should be marked dirty 2022-09-28 11:03:58 +02:00
math-emu
media media: subdev: disallow ioctl for saa6588/davinci 2021-07-19 08:53:17 +02:00
misc
net net: Fix a data-race around sysctl_net_busy_poll. 2022-09-05 10:27:42 +02:00
pcmcia
ras
rdma RDMA/netlink: Add __maybe_unused to static inline in C file 2021-11-26 10:47:18 +01:00
scsi scsi: fcoe: Fix Wstringop-overflow warnings in fcoe_wwn_from_mac() 2022-06-14 18:11:40 +02:00
soc irqchip/eznps: Fix build error for !ARC700 builds 2020-09-17 13:47:47 +02:00
sound ALSA: core: Add async signal helpers 2022-08-25 11:18:37 +02:00
target scsi: target: Fix ordered tag handling 2021-11-26 10:47:16 +01:00
trace spmi: trace: fix stack-out-of-bound access in SPMI tracing functions 2022-08-25 11:18:11 +02:00
uapi can: error: specify the values of data[5..7] of CAN error frames 2022-08-25 11:17:47 +02:00
vdso
video video: of_display_timing.h: include errno.h 2022-07-12 16:30:47 +02:00
xen xen/gnttab: fix gnttab_end_foreign_access() without page specified 2022-03-11 11:22:39 +01:00