Qu Wenruo 5556a872e9 btrfs: defrag: reject unknown flags of btrfs_ioctl_defrag_range_args
commit 173431b274a9a54fc10b273b46e67f46bcf62d2e upstream.

Add extra sanity check for btrfs_ioctl_defrag_range_args::flags.

This is not really to enhance fuzzing tests, but as a preparation for
future expansion on btrfs_ioctl_defrag_range_args.

In the future we're going to add new members, allowing more fine tuning
for btrfs defrag.  Without the -ENONOTSUPP error, there would be no way
to detect if the kernel supports those new defrag features.

CC: stable@vger.kernel.org # 4.14+
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Qu Wenruo <wqu@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-01-31 16:19:06 -08:00
..
2023-05-14 16:05:28 +01:00
2023-05-30 15:20:08 +01:00
2022-08-11 10:31:19 -07:00
2022-06-07 10:20:42 -07:00
2023-08-21 14:54:48 +02:00
2023-04-22 14:41:30 -07:00
2023-01-20 09:33:22 +00:00
2023-03-06 15:49:07 -06:00
2022-04-04 08:55:23 +02:00
2023-03-16 21:20:32 -07:00
2022-08-10 13:49:50 +01:00
2023-10-24 12:02:02 +02:00
2022-07-17 07:52:46 -07:00
2022-09-20 09:13:38 +02:00
2023-01-04 14:59:25 +01:00
2023-03-23 17:25:46 +01:00
2023-06-09 16:25:16 -07:00
2023-08-14 18:48:02 +02:00
2023-04-27 19:15:11 -06:00
2023-07-28 09:33:12 -07:00
2022-09-07 16:46:03 +02:00
2022-08-03 16:29:08 -07:00
2023-01-26 10:52:18 +01:00
2023-08-04 16:20:39 +02:00
2022-11-17 11:04:23 -08:00
2022-09-27 17:29:09 -07:00
2023-06-05 09:36:35 +02:00
2023-03-23 17:25:46 +01:00
2023-06-09 16:13:01 +01:00
2023-08-30 20:41:37 -07:00
2022-12-05 10:30:47 +01:00