linux-stable/fs/lockd
Chuck Lever 9189d23b83 lockd: Remove unneeded initialization of file_lock::c.flc_flags
Since commit 75c7940d2a ("lockd: set missing fl_flags field when
retrieving args"), nlmsvc_retrieve_args() initializes the flc_flags
field. svcxdr_decode_lock() no longer needs to do this.

This clean up removes one dependency on the nlm_lock:fl field. No
behavior change is expected.

Analysis:

svcxdr_decode_lock() is called by:

nlm4svc_decode_testargs()
nlm4svc_decode_lockargs()
nlm4svc_decode_cancargs()
nlm4svc_decode_unlockargs()

nlm4svc_decode_testargs() is used by:
- NLMPROC4_TEST and NLMPROC4_TEST_MSG, which call nlmsvc_retrieve_args()
- NLMPROC4_GRANTED and NLMPROC4_GRANTED_MSG, which don't pass the
  lock's file_lock to the generic lock API

nlm4svc_decode_lockargs() is used by:
- NLMPROC4_LOCK and NLM4PROC4_LOCK_MSG, which call nlmsvc_retrieve_args()
- NLMPROC4_UNLOCK and NLM4PROC4_UNLOCK_MSG, which call nlmsvc_retrieve_args()
- NLMPROC4_NM_LOCK, which calls nlmsvc_retrieve_args()

nlm4svc_decode_cancargs() is used by:
- NLMPROC4_CANCEL and NLMPROC4_CANCEL_MSG, which call nlmsvc_retrieve_args()

nlm4svc_decode_unlockargs() is used by:
- NLMPROC4_UNLOCK and NLMPROC4_UNLOCK_MSG, which call nlmsvc_retrieve_args()

All callers except GRANTED/GRANTED_MSG eventually call
nlmsvc_retrieve_args() before using nlm_lock::fl.c.flc_flags. Thus
this change is safe.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Reviewed-by: NeilBrown <neilb@suse.de>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
2024-11-18 20:23:04 -05:00
..
clnt4xdr.c lockd: adapt to breakup of struct file_lock 2024-02-05 13:11:43 +01:00
clntlock.c lockd: adapt to breakup of struct file_lock 2024-02-05 13:11:43 +01:00
clntproc.c lockd: adapt to breakup of struct file_lock 2024-02-05 13:11:43 +01:00
clntxdr.c lockd: Fix comment about NLMv3 backwards compatibility 2024-11-18 20:22:58 -05:00
host.c lockd: discard nlmsvc_timeout 2024-09-01 10:04:56 -04:00
Makefile lockd: Use *-y instead of *-objs in Makefile 2024-07-08 14:10:03 -04:00
mon.c move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
netns.h filelock: move file locking definitions to separate header file 2023-01-11 06:52:32 -05:00
procfs.c proc: convert everything to "struct proc_ops" 2020-02-04 03:05:26 +00:00
procfs.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
svc4proc.c lockd: Remove unneeded initialization of file_lock::c.flc_flags 2024-11-18 20:23:04 -05:00
svc.c sunrpc: allow svc threads to fail initialisation cleanly 2024-09-20 19:31:03 -04:00
svclock.c lockd: Remove unused parameter to nlmsvc_testlock() 2024-11-18 20:23:04 -05:00
svcproc.c lockd: Remove unused parameter to nlmsvc_testlock() 2024-11-18 20:23:04 -05:00
svcshare.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
svcsubs.c lockd: adapt to breakup of struct file_lock 2024-02-05 13:11:43 +01:00
svcxdr.h NLM: Fix svcxdr_encode_owner() 2021-09-17 10:35:10 -04:00
trace.c lockd: add some client-side tracepoints 2023-04-26 09:05:00 -04:00
trace.h lockd: add some client-side tracepoints 2023-04-26 09:05:00 -04:00
xdr4.c lockd: Remove unneeded initialization of file_lock::c.flc_flags 2024-11-18 20:23:04 -05:00
xdr.c lockd: adapt to breakup of struct file_lock 2024-02-05 13:11:43 +01:00