]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
fuse: remove redundant buffer size checks for interrupt and forget requests
authorJoanne Koong <joannelkoong@gmail.com>
Thu, 30 Apr 2026 11:47:46 +0000 (04:47 -0700)
committerMiklos Szeredi <mszeredi@redhat.com>
Mon, 15 Jun 2026 12:06:19 +0000 (14:06 +0200)
commit6bd421b499ef16006bdc2ee85bf66d3956b52def
tree900a26ad8fb16bd2c8a4d3917caa6634c6e1557a
parentd3aa89c9bfb7cd72a7025ebbb92275128d28afbd
fuse: remove redundant buffer size checks for interrupt and forget requests

In fuse_dev_do_read(), there is already logic that ensures the buffer is
a minimum of at least FUSE_MIN_READ_BUFFER (8k) bytes.

This makes the buffer size checks for interrupt and forget requests
redundant as sizeof(struct fuse_in_header) + sizeof(struct
fuse_interrupt_in) and sizeof(struct fuse_in_header) + sizeof(struct
fuse_forget_in) are both less than FUSE_MIN_READ_BUFFER.

We can get rid of these checks.

Signed-off-by: Joanne Koong <joannelkoong@gmail.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/dev.c