Commit a0cc87f8 authored by Jia Zhu's avatar Jia Zhu Committed by Greg Kroah-Hartman
Browse files

cachefiles: add restore command to recover inflight ondemand read requests



[ Upstream commit e73fa11a ]

Previously, in ondemand read scenario, if the anonymous fd was closed by
user daemon, inflight and subsequent read requests would return EIO.
As long as the device connection is not released, user daemon can hold
and restore inflight requests by setting the request flag to
CACHEFILES_REQ_NEW.

Suggested-by: default avatarGao Xiang <hsiangkao@linux.alibaba.com>
Signed-off-by: default avatarJia Zhu <zhujia.zj@bytedance.com>
Signed-off-by: default avatarXin Yin <yinxin.x@bytedance.com>
Link: https://lore.kernel.org/r/20231120041422.75170-6-zhujia.zj@bytedance.com


Reviewed-by: default avatarJingbo Xu <jefflexu@linux.alibaba.com>
Reviewed-by: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
Stable-dep-of: 4b4391e7 ("cachefiles: defer exposing anon_fd until after copy_to_user() succeeds")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 5344f2ab
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment