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>