This is a note to let you know that I've just added the patch titled btrfs: send: return EOPNOTSUPP on unknown flags to the 6.6-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: btrfs-send-return-eopnotsupp-on-unknown-flags.patch and it can be found in the queue-6.6 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From f884a9f9e59206a2d41f265e7e403f080d10b493 Mon Sep 17 00:00:00 2001 From: David Sterba <dsterba@xxxxxxxx> Date: Wed, 10 Jan 2024 17:48:44 +0100 Subject: btrfs: send: return EOPNOTSUPP on unknown flags From: David Sterba <dsterba@xxxxxxxx> commit f884a9f9e59206a2d41f265e7e403f080d10b493 upstream. When some ioctl flags are checked we return EOPNOTSUPP, like for BTRFS_SCRUB_SUPPORTED_FLAGS, BTRFS_SUBVOL_CREATE_ARGS_MASK or fallocate modes. The EINVAL is supposed to be for a supported but invalid values or combination of options. Fix that when checking send flags so it's consistent with the rest. CC: stable@xxxxxxxxxxxxxxx # 4.14+ Link: https://lore.kernel.org/linux-btrfs/CAL3q7H5rryOLzp3EKq8RTbjMHMHeaJubfpsVLF6H4qJnKCUR1w@xxxxxxxxxxxxxx/ Reviewed-by: Filipe Manana <fdmanana@xxxxxxxx> Signed-off-by: David Sterba <dsterba@xxxxxxxx> Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/btrfs/send.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/btrfs/send.c +++ b/fs/btrfs/send.c @@ -8111,7 +8111,7 @@ long btrfs_ioctl_send(struct inode *inod } if (arg->flags & ~BTRFS_SEND_FLAG_MASK) { - ret = -EINVAL; + ret = -EOPNOTSUPP; goto out; } Patches currently in stable-queue which might be from dsterba@xxxxxxxx are queue-6.6/btrfs-forbid-creating-subvol-qgroups.patch queue-6.6/btrfs-do-not-assert-if-the-newly-created-subvolume-already-got-read.patch queue-6.6/btrfs-don-t-reserve-space-for-checksums-when-writing-to-nocow-files.patch queue-6.6/btrfs-send-return-eopnotsupp-on-unknown-flags.patch queue-6.6/btrfs-don-t-drop-extent_map-for-free-space-inode-on-write-error.patch queue-6.6/btrfs-forbid-deleting-live-subvol-qgroup.patch queue-6.6/btrfs-do-not-delete-unused-block-group-if-it-may-be-used-soon.patch queue-6.6/btrfs-add-and-use-helper-to-check-if-block-group-is-used.patch queue-6.6/btrfs-reject-encoded-write-if-inode-has-nodatasum-flag-set.patch