]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - releases/5.15.154/nfsd-don-t-open-code-clear_and_wake_up_bit.patch
6.6-stable patches
[thirdparty/kernel/stable-queue.git] / releases / 5.15.154 / nfsd-don-t-open-code-clear_and_wake_up_bit.patch
1 From 3ad53cb1b2c3cc045670c00b6fc371cd2aaa4a89 Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Thu, 5 Jan 2023 07:15:09 -0500
4 Subject: nfsd: don't open-code clear_and_wake_up_bit
5
6 From: Jeff Layton <jlayton@kernel.org>
7
8 [ Upstream commit b8bea9f6cdd7236c7c2238d022145e9b2f8aac22 ]
9
10 Signed-off-by: Jeff Layton <jlayton@kernel.org>
11 Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
12 ---
13 fs/nfsd/filecache.c | 4 +---
14 1 file changed, 1 insertion(+), 3 deletions(-)
15
16 diff --git a/fs/nfsd/filecache.c b/fs/nfsd/filecache.c
17 index 4a3796c6bd957..677a8d935ccc2 100644
18 --- a/fs/nfsd/filecache.c
19 +++ b/fs/nfsd/filecache.c
20 @@ -1173,9 +1173,7 @@ nfsd_file_do_acquire(struct svc_rqst *rqstp, struct svc_fh *fhp,
21 status = nfserr_jukebox;
22 if (status != nfs_ok)
23 nfsd_file_unhash(nf);
24 - clear_bit_unlock(NFSD_FILE_PENDING, &nf->nf_flags);
25 - smp_mb__after_atomic();
26 - wake_up_bit(&nf->nf_flags, NFSD_FILE_PENDING);
27 + clear_and_wake_up_bit(NFSD_FILE_PENDING, &nf->nf_flags);
28 goto out;
29 }
30
31 --
32 2.43.0
33