linux-stable/include
Qu Wenruo 604e6681e1 btrfs: scrub: reject unsupported scrub flags
Since the introduction of scrub interface, the only flag that we support
is BTRFS_SCRUB_READONLY.  Thus there is no sanity checks, if there are
some undefined flags passed in, we just ignore them.

This is problematic if we want to introduce new scrub flags, as we have
no way to determine if such flags are supported.

Address the problem by introducing a check for the flags, and if
unsupported flags are set, return -EOPNOTSUPP to inform the user space.

This check should be backported for all supported kernels before any new
scrub flags are introduced.

CC: stable@vger.kernel.org # 4.14+
Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2023-04-17 19:52:19 +02:00
..
acpi ACPI: video: Add auto_detect arg to __acpi_video_get_backlight_type() 2023-04-05 20:23:02 +02:00
asm-generic asm-generic: avoid __generic_cmpxchg_local warnings 2023-04-04 17:58:11 +02:00
clocksource
crypto
drm Merge branch 'etnaviv/fixes' of https://git.pengutronix.de/git/lst/linux into drm-fixes 2023-03-30 20:15:07 +02:00
dt-bindings
keys
kunit
kvm KVM: arm64: timers: Convert per-vcpu virtual offset to a global value 2023-03-11 02:00:40 -08:00
linux libcrc32c: remove crc32c_impl 2023-04-17 18:01:23 +02:00
math-emu
media
memory
misc
net mlx5: bpf_xdp_metadata_rx_hash add xdp rss hash type 2023-04-13 11:15:10 -07:00
pcmcia
ras
rdma
rv
scsi scsi: core: Add BLIST_NO_VPD_SIZE for some VDASD 2023-03-09 20:57:58 -05:00
soc
sound
target
trace btrfs: replace btrfs_io_context::raid_map with a fixed u64 value 2023-04-17 18:01:14 +02:00
uapi btrfs: scrub: reject unsupported scrub flags 2023-04-17 19:52:19 +02:00
ufs scsi: Revert "scsi: ufs: core: Initialize devfreq synchronously" 2023-04-02 21:12:34 -04:00
vdso
video
xen xen: branch for v6.3-rc3 2023-03-17 10:45:49 -07:00