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>
…
Linux kernel ============ This file was moved to Documentation/admin-guide/README.rst Please notice that there are several guides for kernel developers and users. These guides can be rendered in a number of formats, like HTML and PDF. In order to build the documentation, use ``make htmldocs`` or ``make pdfdocs``. There are various text files in the Documentation/ subdirectory, several of them using the Restructured Text markup notation. See Documentation/00-INDEX for a list of what is contained in each file. Please read the Documentation/process/changes.rst file, as it contains the requirements for building and running the kernel, and information about the problems which may result by upgrading your kernel.
Description
Languages
C
97.6%
Assembly
1%
Shell
0.5%
Python
0.3%
Makefile
0.3%