diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 10:48:32 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-21 10:48:32 -0700 |
commit | d6fb1db02e02aea98f2d7e121fd30e24c84639d6 (patch) | |
tree | 865546f0388c40d52cf98febe2c6d21039915ea2 /fs/sysfs/file.c | |
parent | b4e6b09738fde057ce885703705f71cc953d0512 (diff) | |
parent | a1b3f594dc5faab91d3a218c7019e9b5edd9fe1a (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6: (38 commits)
net: Expose all network devices in a namespaces in sysfs
hotplug: netns aware uevent_helper
kobj: Send hotplug events in the proper namespace.
netlink: Implment netlink_broadcast_filtered
net/sysfs: Fix the bitrot in network device kobject namespace support
netns: Teach network device kobjects which namespace they are in.
kobject: Send hotplug events in all network namespaces
driver-core: fix Typo in drivers/base/core.c for CONFIG_MODULE
pci: check caps from sysfs file open to read device dependent config space
sysfs: add struct file* to bin_attr callbacks
sysfs: Remove usage of S_BIAS to avoid merge conflict with the vfs tree
sysfs: Don't use enums in inline function declaration.
sysfs-namespaces: add a high-level Documentation file
sysfs: Comment sysfs directory tagging logic
driver core: Implement ns directory support for device classes.
sysfs: Implement sysfs_delete_link
sysfs: Add support for tagged directories with untagged members.
sysfs: Implement sysfs tagged directory support.
kobj: Add basic infrastructure for dealing with namespaces.
sysfs: Remove double free sysfs_get_sb
...
Diffstat (limited to 'fs/sysfs/file.c')
-rw-r--r-- | fs/sysfs/file.c | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/fs/sysfs/file.c b/fs/sysfs/file.c index e222b258274..1beaa739d0a 100644 --- a/fs/sysfs/file.c +++ b/fs/sysfs/file.c @@ -478,9 +478,12 @@ void sysfs_notify(struct kobject *k, const char *dir, const char *attr) mutex_lock(&sysfs_mutex); if (sd && dir) - sd = sysfs_find_dirent(sd, dir); + /* Only directories are tagged, so no need to pass + * a tag explicitly. + */ + sd = sysfs_find_dirent(sd, NULL, dir); if (sd && attr) - sd = sysfs_find_dirent(sd, attr); + sd = sysfs_find_dirent(sd, NULL, attr); if (sd) sysfs_notify_dirent(sd); @@ -569,7 +572,7 @@ int sysfs_add_file_to_group(struct kobject *kobj, int error; if (group) - dir_sd = sysfs_get_dirent(kobj->sd, group); + dir_sd = sysfs_get_dirent(kobj->sd, NULL, group); else dir_sd = sysfs_get(kobj->sd); @@ -599,7 +602,7 @@ int sysfs_chmod_file(struct kobject *kobj, struct attribute *attr, mode_t mode) mutex_lock(&sysfs_mutex); rc = -ENOENT; - sd = sysfs_find_dirent(kobj->sd, attr->name); + sd = sysfs_find_dirent(kobj->sd, NULL, attr->name); if (!sd) goto out; @@ -624,7 +627,7 @@ EXPORT_SYMBOL_GPL(sysfs_chmod_file); void sysfs_remove_file(struct kobject * kobj, const struct attribute * attr) { - sysfs_hash_and_remove(kobj->sd, attr->name); + sysfs_hash_and_remove(kobj->sd, NULL, attr->name); } void sysfs_remove_files(struct kobject * kobj, const struct attribute **ptr) @@ -646,11 +649,11 @@ void sysfs_remove_file_from_group(struct kobject *kobj, struct sysfs_dirent *dir_sd; if (group) - dir_sd = sysfs_get_dirent(kobj->sd, group); + dir_sd = sysfs_get_dirent(kobj->sd, NULL, group); else dir_sd = sysfs_get(kobj->sd); if (dir_sd) { - sysfs_hash_and_remove(dir_sd, attr->name); + sysfs_hash_and_remove(dir_sd, NULL, attr->name); sysfs_put(dir_sd); } } |