Skip to content

Commit fa501bc

Browse files
calebsanderkdave
authored andcommitted
btrfs: don't skip accounting in early ENOTTY return in btrfs_uring_encoded_read()
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: 34310c4 ("btrfs: add io_uring command for encoded reads (ENCODED_READ ioctl)") Signed-off-by: Caleb Sander Mateos <csander@purestorage.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
1 parent fc98692 commit fa501bc

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

fs/btrfs/ioctl.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4825,7 +4825,8 @@ static int btrfs_uring_encoded_read(struct io_uring_cmd *cmd, unsigned int issue
48254825
#if defined(CONFIG_64BIT) && defined(CONFIG_COMPAT)
48264826
copy_end = offsetofend(struct btrfs_ioctl_encoded_io_args_32, flags);
48274827
#else
4828-
return -ENOTTY;
4828+
ret = -ENOTTY;
4829+
goto out_acct;
48294830
#endif
48304831
} else {
48314832
copy_end = copy_end_kernel;

0 commit comments

Comments
 (0)