sysfs: only access bin file vm_ops with the active lock
authorEric W. Biederman <ebiederm@aristanetworks.com>
Mon, 20 Sep 2010 07:57:03 +0000 (00:57 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 22 Oct 2010 17:16:43 +0000 (10:16 -0700)
commit38f49a5132f24d29236820eb5c7dd956e47f94a3
treeeb2d3184996d01babcf3689dd20d626f731d340a
parenta6849fa1f7d7d7adbeb6a696beeabfa078acf173
sysfs: only access bin file vm_ops with the active lock

bb->vm_ops is a cached copy of the vm_ops of the underlying
sysfs bin file, which means that after sysfs_bin_remove_file
completes it is only longer valid to deference bb->vm_ops.

So move all of the tests of bb->vm_ops inside of where
we hold the sysfs active lock.

Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/sysfs/bin.c