diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-07 22:22:26 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-07 22:22:26 -0500 |
commit | f2aca47dc3c2d0c2d5dbd972558557e74232bbce (patch) | |
tree | eae58f599a25a1f3ab41bf616a2b7c4b3c6e2277 /fs/sysfs/mount.c | |
parent | 7677ced48e2bbbb8d847d34f37e5d96d2b0e41e4 (diff) | |
parent | b592fcfe7f06c15ec11774b5be7ce0de3aa86e73 (diff) |
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (28 commits)
sysfs: Shadow directory support
Driver Core: Increase the default timeout value of the firmware subsystem
Driver core: allow to delay the uevent at device creation time
Driver core: add device_type to struct device
Driver core: add uevent vars for devices of a class
SYSFS: Fix missing include of list.h in sysfs.h
HOWTO: Add a reference to Harbison and Steele
sysfs: error handling in sysfs, fill_read_buffer()
kobject: kobject_put cleanup
sysfs: kobject_put cleanup
sysfs: suppress lockdep warnings
Driver core: fix race in sysfs between sysfs_remove_file() and read()/write()
driver core: Change function call order in device_bind_driver().
driver core: Don't stop probing on ->probe errors.
driver core fixes: device_register() retval check in platform.c
driver core fixes: make_class_name() retval checks
/sys/modules/*/holders
USB: add the sysfs driver name to all modules
SERIO: add the sysfs driver name to all modules
PCI: add the sysfs driver name to all modules
...
Diffstat (limited to 'fs/sysfs/mount.c')
-rw-r--r-- | fs/sysfs/mount.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/fs/sysfs/mount.c b/fs/sysfs/mount.c index e503f858fba8..f6a87a824883 100644 --- a/fs/sysfs/mount.c +++ b/fs/sysfs/mount.c | |||
@@ -8,6 +8,7 @@ | |||
8 | #include <linux/mount.h> | 8 | #include <linux/mount.h> |
9 | #include <linux/pagemap.h> | 9 | #include <linux/pagemap.h> |
10 | #include <linux/init.h> | 10 | #include <linux/init.h> |
11 | #include <asm/semaphore.h> | ||
11 | 12 | ||
12 | #include "sysfs.h" | 13 | #include "sysfs.h" |
13 | 14 | ||
@@ -18,9 +19,12 @@ struct vfsmount *sysfs_mount; | |||
18 | struct super_block * sysfs_sb = NULL; | 19 | struct super_block * sysfs_sb = NULL; |
19 | struct kmem_cache *sysfs_dir_cachep; | 20 | struct kmem_cache *sysfs_dir_cachep; |
20 | 21 | ||
22 | static void sysfs_clear_inode(struct inode *inode); | ||
23 | |||
21 | static struct super_operations sysfs_ops = { | 24 | static struct super_operations sysfs_ops = { |
22 | .statfs = simple_statfs, | 25 | .statfs = simple_statfs, |
23 | .drop_inode = generic_delete_inode, | 26 | .drop_inode = sysfs_delete_inode, |
27 | .clear_inode = sysfs_clear_inode, | ||
24 | }; | 28 | }; |
25 | 29 | ||
26 | static struct sysfs_dirent sysfs_root = { | 30 | static struct sysfs_dirent sysfs_root = { |
@@ -31,6 +35,11 @@ static struct sysfs_dirent sysfs_root = { | |||
31 | .s_iattr = NULL, | 35 | .s_iattr = NULL, |
32 | }; | 36 | }; |
33 | 37 | ||
38 | static void sysfs_clear_inode(struct inode *inode) | ||
39 | { | ||
40 | kfree(inode->i_private); | ||
41 | } | ||
42 | |||
34 | static int sysfs_fill_super(struct super_block *sb, void *data, int silent) | 43 | static int sysfs_fill_super(struct super_block *sb, void *data, int silent) |
35 | { | 44 | { |
36 | struct inode *inode; | 45 | struct inode *inode; |