linux-stable/block
Sarthak Kukreti 1364a3c391 block: Don't invalidate pagecache for invalid falloc modes
Only call truncate_bdev_range() if the fallocate mode is supported. This
fixes a bug where data in the pagecache could be invalidated if the
fallocate() was called on the block device with an invalid mode.

Fixes: 25f4c41415 ("block: implement (some of) fallocate for block devices")
Cc: stable@vger.kernel.org
Reported-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Sarthak Kukreti <sarthakkukreti@chromium.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Fixes: line?  I've never seen those wrapped.
Link: https://lore.kernel.org/r/20231011201230.750105-1-sarthakkukreti@chromium.org
Signed-off-by: Jens Axboe <axboe@kernel.dk>
2023-10-11 15:53:17 -06:00
..
partitions for-6.6/block-2023-08-28 2023-08-29 20:21:42 -07:00
Kconfig block: sed-opal: keyring support for SED keys 2023-08-22 11:10:26 -06:00
Kconfig.iosched
Makefile
badblocks.c
bdev.c New code for 6.6: 2023-08-23 13:06:55 +02:00
bfq-cgroup.c
bfq-iosched.c SCSI misc on 20230629 2023-06-30 11:57:07 -07:00
bfq-iosched.h
bfq-wf2q.c
bio-integrity.c bio-integrity: create multi-page bvecs in bio_integrity_add_page() 2023-08-09 16:05:35 -06:00
bio.c block: Bring back zero_fill_bio_iter 2023-08-14 15:40:42 -06:00
blk-cgroup-fc-appid.c
blk-cgroup-rwstat.c
blk-cgroup-rwstat.h
blk-cgroup.c for-6.6/block-2023-08-28 2023-08-29 20:21:42 -07:00
blk-cgroup.h
blk-core.c for-6.6/block-2023-08-28 2023-08-29 20:21:42 -07:00
blk-crypto-fallback.c blk-crypto: dynamically allocate fallback profile 2023-08-18 15:00:39 -06:00
blk-crypto-internal.h
blk-crypto-profile.c blk-crypto: use dynamic lock class for blk_crypto_profile::lock 2023-07-05 16:36:12 -06:00
blk-crypto-sysfs.c
blk-crypto.c
blk-flush.c blk-flush: reuse rq queuelist in flush state machine 2023-07-17 08:18:21 -06:00
blk-ia-ranges.c
blk-integrity.c
blk-ioc.c
blk-iocost.c blk-iocost: fix queue stats accounting 2023-08-09 16:04:14 -06:00
blk-iolatency.c block: fix bad lockdep annotation in blk-iolatency 2023-08-10 17:24:53 -06:00
blk-ioprio.c
blk-ioprio.h
blk-lib.c
blk-map.c block: fix pin count management when merging same-page segments 2023-09-06 07:32:27 -06:00
blk-merge.c
blk-mq-cpumap.c
blk-mq-debugfs-zoned.c
blk-mq-debugfs.c
blk-mq-debugfs.h
blk-mq-pci.c
blk-mq-sched.c
blk-mq-sched.h
blk-mq-sysfs.c
blk-mq-tag.c for-6.5/block-2023-06-23 2023-06-26 12:47:20 -07:00
blk-mq-virtio.c
blk-mq.c blk-mq: fix tags UAF when shrinking q->nr_hw_queues 2023-09-11 16:17:34 -06:00
blk-mq.h
blk-pm.c
blk-pm.h
blk-rq-qos.c block: correct stale comment in rq_qos_wait 2023-09-18 14:15:28 -06:00
blk-rq-qos.h
blk-settings.c block: don't allow enabling a cache on devices that don't support it 2023-07-17 08:18:18 -06:00
blk-stat.c
blk-stat.h
blk-sysfs.c block: don't allow enabling a cache on devices that don't support it 2023-07-17 08:18:18 -06:00
blk-throttle.c blk-throttle: consider 'carryover_ios/bytes' in throtl_trim_slice() 2023-08-30 10:15:01 -06:00
blk-throttle.h blk-throttle: print signed value 'carryover_bytes/ios' for user 2023-08-30 10:15:01 -06:00
blk-timeout.c
blk-wbt.c Merge branch 'for-6.5/block-late' into block-6.5 2023-06-28 16:08:19 -06:00
blk-wbt.h
blk-zoned.c Merge branch '6.5/scsi-staging' into 6.5/scsi-fixes 2023-07-11 12:15:15 -04:00
blk.h block: Add some exports for bcachefs 2023-08-14 15:40:42 -06:00
bounce.c
bsg-lib.c
bsg.c SCSI misc on 20230629 2023-06-30 11:57:07 -07:00
disk-events.c block: fix kernel-doc for disk_force_media_change() 2023-09-26 00:43:34 -06:00
early-lookup.c
elevator.c blk-mq: release scheduler resource when request completes 2023-08-19 07:47:17 -06:00
elevator.h
fops.c block: Don't invalidate pagecache for invalid falloc modes 2023-10-11 15:53:17 -06:00
genhd.c block: call into the file system for bdev_mark_dead 2023-08-21 14:35:32 +02:00
holder.c
ioctl.c block: don't add or resize partition on the disk with GENHD_FL_NO_PART 2023-08-31 08:00:35 -06:00
ioprio.c
kyber-iosched.c
mq-deadline.c block/mq-deadline: use correct way to throttling write requests 2023-08-08 15:46:41 -06:00
opal_proto.h block: sed-opal: Implement IOC_OPAL_REVERT_LSP 2023-08-22 11:10:26 -06:00
sed-opal.c block: sed-opal: keyring support for SED keys 2023-08-22 11:10:26 -06:00
t10-pi.c