mirror of
git://git.yoctoproject.org/linux-yocto.git
synced 2025-10-22 23:13:01 +02:00
btrfs: don't skip accounting in early ENOTTY return in btrfs_uring_encoded_read()
commitea124ec327
upstream. btrfs_uring_encoded_read() returns early with -ENOTTY if the uring_cmd is issued with IO_URING_F_COMPAT but the kernel doesn't support compat syscalls. However, this early return bypasses the syscall accounting. Go to out_acct instead to ensure the syscall is counted. Fixes:34310c442e
("btrfs: add io_uring command for encoded reads (ENCODED_READ ioctl)") CC: stable@vger.kernel.org # 6.15+ Signed-off-by: Caleb Sander Mateos <csander@purestorage.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>
This commit is contained in:
parent
5a51957364
commit
e0a8165b21
|
@ -4829,7 +4829,8 @@ static int btrfs_uring_encoded_read(struct io_uring_cmd *cmd, unsigned int issue
|
|||
#if defined(CONFIG_64BIT) && defined(CONFIG_COMPAT)
|
||||
copy_end = offsetofend(struct btrfs_ioctl_encoded_io_args_32, flags);
|
||||
#else
|
||||
return -ENOTTY;
|
||||
ret = -ENOTTY;
|
||||
goto out_acct;
|
||||
#endif
|
||||
} else {
|
||||
copy_end = copy_end_kernel;
|
||||
|
|
Loading…
Reference in New Issue
Block a user