sysfs: Fix locking and factor out sysfs_sd_setattr
authorEric W. Biederman <ebiederm@xmission.com>
Sat, 21 Nov 2009 00:08:50 +0000 (16:08 -0800)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 11 Dec 2009 19:24:53 +0000 (11:24 -0800)
commit35df63c46c8605d00140ec4833d2104e2e9f1acc
tree1f02d75ab4589d3c8878e38e9d45360a0c0667d4
parent4be3df28beec5605c77a18aa2a4f987b5648f9ce
sysfs: Fix locking and factor out sysfs_sd_setattr

Cleanly separate the work that is specific to setting the
attributes of a sysfs_dirent from what is needed to update
the attributes of a vfs inode.

Additionally grab the sysfs_mutex to keep any nasties from
surprising us when updating the sysfs_dirent.

Acked-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Eric W. Biederman <ebiederm@aristanetworks.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/sysfs/inode.c
fs/sysfs/sysfs.h