summaryrefslogtreecommitdiffstats
path: root/lib/decompress.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-10-30 15:28:36 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-01 20:13:37 +0100
commit0cae60f91494e34a0c5391f1455f825d5849b05f (patch)
tree56746a582c79df11a88fe0016ea4919c018d5553 /lib/decompress.c
parentsysfs: use generic_file_llseek() for sysfs_file_operations (diff)
downloadlinux-0cae60f91494e34a0c5391f1455f825d5849b05f.tar.xz
linux-0cae60f91494e34a0c5391f1455f825d5849b05f.zip
sysfs: rename sysfs_assoc_lock and explain what it's about
sysfs_assoc_lock is an odd piece of locking. In general, whoever owns a kobject is responsible for synchronizing sysfs operations and sysfs proper assumes that, for example, removal won't race with any other operation; however, this doesn't work for symlinking because an entity performing symlink doesn't usually own the target kobject and thus has no control over its removal. sysfs_assoc_lock synchronizes symlink operations against kobj->sd disassociation so that symlink code doesn't end up dereferencing already freed sysfs_dirent by racing with removal of the target kobject. This is quite obscure and the generic name of the lock and lack of comments make it difficult to understand its role. Let's rename it to sysfs_symlink_target_lock and add comments explaining what's going on. Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'lib/decompress.c')
0 files changed, 0 insertions, 0 deletions