diff options
| author | 2018-02-20 13:23:38 +1100 | |
|---|---|---|
| committer | 2018-02-22 15:06:36 +0100 | |
| commit | daa5611c716a6dbd234c7ebe4ed2c05eeb96b538 (patch) | |
| tree | 504b39a915d6a2371e267f071503b1e284b12a41 /include/linux/debugobjects.h | |
| parent | staging: lustre: ptlrpc: list_for_each improvements. (diff) | |
staging: lustre: fid: convert lcs_mutex to a spinlock
There is only one place where this lock is held
while the task might sleep - in
ldebugfs_fid_space_seq_write()
while ldebugfs_fid_write_common() is called.
This call can easily be taken out of the locked region
by asking it to parse the user data into a local variable,
and then copying that variable into ->lcs_space while
holding the lock.
Note that ldebugfs_gid_write_common returns >0 on
success, so use that to gate updating ->lcs_space.
So make that change, and convert lcs_mutex to a spinlock
named lcs_lock. spinlocks are slightly cheaper than mutexes
and using one makes is clear that the lock is only held for
a short time.
Signed-off-by: NeilBrown <neilb@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/debugobjects.h')
0 files changed, 0 insertions, 0 deletions
