]> www.infradead.org Git - users/jedix/linux-maple.git/commit
cachefiles: stop sending new request when dropping object
authorBaokun Li <libaokun1@huawei.com>
Fri, 28 Jun 2024 06:29:26 +0000 (14:29 +0800)
committerChristian Brauner <brauner@kernel.org>
Wed, 3 Jul 2024 08:36:15 +0000 (10:36 +0200)
commitb2415d1f4566b6939acacc69637eaa57815829c1
tree541ee42258c45ba7301b5cf1f140a4d658669f0f
parent0ece614a52bc9d219b839a6a29282b30d10e0c48
cachefiles: stop sending new request when dropping object

Added CACHEFILES_ONDEMAND_OBJSTATE_DROPPING indicates that the cachefiles
object is being dropped, and is set after the close request for the dropped
object completes, and no new requests are allowed to be sent after this
state.

This prepares for the later addition of cancel_work_sync(). It prevents
leftover reopen requests from being sent, to avoid processing unnecessary
requests and to avoid cancel_work_sync() blocking by waiting for daemon to
complete the reopen requests.

Signed-off-by: Baokun Li <libaokun1@huawei.com>
Link: https://lore.kernel.org/r/20240628062930.2467993-6-libaokun@huaweicloud.com
Acked-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Reviewed-by: Jia Zhu <zhujia.zj@bytedance.com>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/cachefiles/internal.h
fs/cachefiles/ondemand.c