]> www.infradead.org Git - users/jedix/linux-maple.git/commit
fuse: add fast path for fuse_range_is_writeback
authoryangyun <yangyun50@huawei.com>
Wed, 14 Aug 2024 09:36:00 +0000 (17:36 +0800)
committerMiklos Szeredi <mszeredi@redhat.com>
Thu, 29 Aug 2024 09:43:12 +0000 (11:43 +0200)
commitac5cffec53be0b0231b89470a357bd3a5814f599
treebc01f2777592b950dc84062994c5e8ba5a5c16ff
parent5de8acb41c86f1d335d165e0a350441ea3a1f480
fuse: add fast path for fuse_range_is_writeback

In some cases, the fi->writepages may be empty. And there is no need
to check fi->writepages with spin_lock, which may have an impact on
performance due to lock contention. For example, in scenarios where
multiple readers read the same file without any writers, or where
the page cache is not enabled.

Also remove the outdated comment since commit 6b2fb79963fb ("fuse:
optimize writepages search") has optimize the situation by replacing
list with rb-tree.

Signed-off-by: yangyun <yangyun50@huawei.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
fs/fuse/file.c