]> git.baikalelectronics.ru Git - kernel.git/commit
sysfs: Only take active references on attributes.
authorEric W. Biederman <ebiederm@xmission.com>
Thu, 11 Feb 2010 23:20:00 +0000 (15:20 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Mon, 8 Mar 2010 01:04:51 +0000 (17:04 -0800)
commit9e6422a1f5a7df9d871e68c7eed4797d9e10df7c
tree0415c6cfb33753c7a20e05d95e3ce485a60b1f41
parentcd0dd50b6502a37254d76fef12fb1ff160c6f6a4
sysfs: Only take active references on attributes.

If we exclude directories and symlinks from the set of sysfs
dirents where we need active references we are left with
sysfs attributes (binary or not).

- Tweak sysfs_deactivate to only do something on attributes
- Move lockdep initialization into sysfs_file_add_mode to
  limit it to just attributes.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: Tejun Heo <tj@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/sysfs/dir.c
fs/sysfs/file.c
fs/sysfs/sysfs.h