[Devel] [PATCH RHEL9 COMMIT] Revert "ms/nfsd: don't put blocked locks on LRU until after vfs_lock_file returns"
Konstantin Khorenko
khorenko at virtuozzo.com
Wed Jan 12 18:36:40 MSK 2022
The commit is pushed to "branch-rh9-5.14.vz9.1.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh9-5.14.0-4.vz9.10.38
------>
commit 23a67c23879cc16ff45038c2066f0510aefb3ece
Author: Vasily Averin <vvs at virtuozzo.com>
Date: Wed Jan 12 18:36:40 2022 +0300
Revert "ms/nfsd: don't put blocked locks on LRU until after vfs_lock_file returns"
This reverts commit 11403ddc5f3ba8b9c7c97a5ced50289319ac3096.
https://jira.sw.ru/browse/PSBM-136851
Signed-off-by: Vasily Averin <vvs at virtuozzo.com>
---
fs/nfsd/nfs4state.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
index ad8633811ea7..fa67ecd5fe63 100644
--- a/fs/nfsd/nfs4state.c
+++ b/fs/nfsd/nfs4state.c
@@ -6963,8 +6963,10 @@ nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
}
if (fl_flags & FL_SLEEP) {
+ nbl->nbl_time = ktime_get_boottime_seconds();
spin_lock(&nn->blocked_locks_lock);
list_add_tail(&nbl->nbl_list, &lock_sop->lo_blocked);
+ list_add_tail(&nbl->nbl_lru, &nn->blocked_locks_lru);
spin_unlock(&nn->blocked_locks_lock);
}
@@ -6977,10 +6979,6 @@ nfsd4_lock(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
nn->somebody_reclaimed = true;
break;
case FILE_LOCK_DEFERRED:
- nbl->nbl_time = ktime_get_boottime_seconds();
- spin_lock(&nn->blocked_locks_lock);
- list_add_tail(&nbl->nbl_lru, &nn->blocked_locks_lru);
- spin_unlock(&nn->blocked_locks_lock);
nbl = NULL;
fallthrough;
case -EAGAIN: /* conflock holds conflicting lock */
More information about the Devel
mailing list