diff options
author | NeilBrown <[email protected]> | 2019-04-24 12:00:08 +1000 |
---|---|---|
committer | J. Bruce Fields <[email protected]> | 2019-04-24 09:51:48 -0400 |
commit | 5926459e7c897ee348c134f44da520c8bf234b05 (patch) | |
tree | d2134d1e9433de3caeac5dcf636c32580ae26c8d /scripts/bpf_helpers_doc.py | |
parent | 0ca0c9d7edcf4996da3ebf07947c4484d1e3de16 (diff) |
locks: move checks from locks_free_lock() to locks_release_private()
Code that allocates locks using locks_alloc_lock() will free it
using locks_free_lock(), and will benefit from the BUG_ON()
consistency checks therein.
However some code (nfsd and lockd) allocate a lock embedded in
some other data structure, and so free the lock themselves after
calling locks_release_private(). This path does not benefit from
the consistency checks.
To help catch future errors, move the BUG_ON() checks to
locks_release_private() - which locks_free_lock() already calls.
This ensures that all users for locks will find out if the lock
isn't detached properly before being free.
Signed-off-by: NeilBrown <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Signed-off-by: J. Bruce Fields <[email protected]>
Diffstat (limited to 'scripts/bpf_helpers_doc.py')
0 files changed, 0 insertions, 0 deletions