sysfs: add sysfs_open_file_mutex
authorTejun Heo <tj@kernel.org>
Tue, 1 Oct 2013 21:41:58 +0000 (17:41 -0400)
committerPawel Osmialowski <p.osmialowsk@mcdsrvbld02.digital.local>
Fri, 27 Mar 2015 17:13:10 +0000 (18:13 +0100)
commit2c479575d3f6221d704153de9e9e345f1984d757
tree38e31e8a4fde366ca929763f11d50f1fb8263e33
parent502450a7be2e5c98dadf4678d534d8e994b81765
sysfs: add sysfs_open_file_mutex

Add a separate mutex to protect sysfs_open_dirent->buffers list.  This
will allow performing sleepable operations while traversing
sysfs_buffers, which will be renamed to sysfs_open_file.

Note that currently sysfs_open_dirent->buffers list isn't being used
for anything and this patch doesn't make any functional difference.
It will be used to merge regular and bin file supports.

Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/sysfs/file.c