]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-5.15/nfsd-clean-up-_lm_-operation-names.patch
Fixes for 5.15
[thirdparty/kernel/stable-queue.git] / queue-5.15 / nfsd-clean-up-_lm_-operation-names.patch
1 From 6d85536e4c6957abd740c626d6368f66f619137f Mon Sep 17 00:00:00 2001
2 From: Sasha Levin <sashal@kernel.org>
3 Date: Wed, 16 Feb 2022 11:26:06 -0500
4 Subject: NFSD: Clean up _lm_ operation names
5
6 From: Chuck Lever <chuck.lever@oracle.com>
7
8 [ Upstream commit 35aff0678f99b0623bb72d50112de9e163a19559 ]
9
10 The common practice is to name function instances the same as the
11 method names, but with a uniquifying prefix. Commit aef9583b234a
12 ("NFSD: Get reference of lockowner when coping file_lock") missed
13 this -- the new function names should both have been of the form
14 "nfsd4_lm_*".
15
16 Before more lock manager operations are added in NFSD, rename these
17 two functions for consistency.
18
19 Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
20 ---
21 fs/nfsd/nfs4state.c | 8 ++++----
22 1 file changed, 4 insertions(+), 4 deletions(-)
23
24 diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c
25 index fc0d7fbe5d4a6..5f3adb59c1ffd 100644
26 --- a/fs/nfsd/nfs4state.c
27 +++ b/fs/nfsd/nfs4state.c
28 @@ -6552,7 +6552,7 @@ nfs4_transform_lock_offset(struct file_lock *lock)
29 }
30
31 static fl_owner_t
32 -nfsd4_fl_get_owner(fl_owner_t owner)
33 +nfsd4_lm_get_owner(fl_owner_t owner)
34 {
35 struct nfs4_lockowner *lo = (struct nfs4_lockowner *)owner;
36
37 @@ -6561,7 +6561,7 @@ nfsd4_fl_get_owner(fl_owner_t owner)
38 }
39
40 static void
41 -nfsd4_fl_put_owner(fl_owner_t owner)
42 +nfsd4_lm_put_owner(fl_owner_t owner)
43 {
44 struct nfs4_lockowner *lo = (struct nfs4_lockowner *)owner;
45
46 @@ -6596,8 +6596,8 @@ nfsd4_lm_notify(struct file_lock *fl)
47
48 static const struct lock_manager_operations nfsd_posix_mng_ops = {
49 .lm_notify = nfsd4_lm_notify,
50 - .lm_get_owner = nfsd4_fl_get_owner,
51 - .lm_put_owner = nfsd4_fl_put_owner,
52 + .lm_get_owner = nfsd4_lm_get_owner,
53 + .lm_put_owner = nfsd4_lm_put_owner,
54 };
55
56 static inline void
57 --
58 2.43.0
59