Skip to content

Commit bfdd89f

Browse files
J. Bruce Fieldschucklever
authored andcommitted
nfsd: don't abort copies early
The typical result of the backwards comparison here is that the source server in a server-to-server copy will return BAD_STATEID within a few seconds of the copy starting, instead of giving the copy a full lease period, so the copy_file_range() call will end up unnecessarily returning a short read. Fixes: 624322f "NFSD add COPY_NOTIFY operation" Signed-off-by: J. Bruce Fields <bfields@redhat.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
1 parent 7005227 commit bfdd89f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/nfsd/nfs4state.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5389,7 +5389,7 @@ nfs4_laundromat(struct nfsd_net *nn)
53895389
idr_for_each_entry(&nn->s2s_cp_stateids, cps_t, i) {
53905390
cps = container_of(cps_t, struct nfs4_cpntf_state, cp_stateid);
53915391
if (cps->cp_stateid.sc_type == NFS4_COPYNOTIFY_STID &&
5392-
cps->cpntf_time > cutoff)
5392+
cps->cpntf_time < cutoff)
53935393
_free_cpntf_state_locked(nn, cps);
53945394
}
53955395
spin_unlock(&nn->s2s_cp_lock);

0 commit comments

Comments
 (0)