summaryrefslogtreecommitdiff
path: root/include/linux/workqueue_api.h
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2026-05-21 16:25:40 +0300
committerChuck Lever <cel@kernel.org>2026-06-09 23:32:59 +0300
commit0150459b05490b88b7e7378a31550a9e07b5517c (patch)
tree74923fc74c1b707e63407fcc1ca3469eff5fa9ad /include/linux/workqueue_api.h
parenta60f25a800846ab8e5a13f8a9d05111f2aee55a7 (diff)
downloadlinux-0150459b05490b88b7e7378a31550a9e07b5517c.tar.xz
nfsd: fix inverted cp_ttl check in async copy reaper
nfsd4_async_copy_reaper() is supposed to keep completed async copy state around for NFSD_COPY_INITIAL_TTL (10) laundromat ticks so that OFFLOAD_STATUS can report the result, then reap the state once the countdown expires. The TTL predicate is inverted: `if (--copy->cp_ttl)` is true while ticks remain and false when the counter reaches zero. This causes the copy to be reaped on the very first tick (cp_ttl goes from 10 to 9, which is non-zero) instead of after all 10 ticks elapse. Once reaped, OFFLOAD_STATUS returns NFS4ERR_BAD_STATEID because the copy state has already been freed. Fix by negating the test so that cleanup runs when the TTL expires. Fixes: aa0ebd21df9c ("NFSD: Add nfsd4_copy time-to-live") Cc: stable@vger.kernel.org Reported-by: Chris Mason <clm@meta.com> Assisted-by: kres:claude-opus-4-6 Signed-off-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Diffstat (limited to 'include/linux/workqueue_api.h')
0 files changed, 0 insertions, 0 deletions