diff options
author | Miklos Szeredi <miklos@szeredi.hu> | 2006-01-17 01:14:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-17 02:15:29 -0500 |
commit | f87fd4c2a0c4f3baad28057360b36a59591ef751 (patch) | |
tree | 987b4e83d617fc845e11ff1df145f1d4238af956 | |
parent | 0e6e1db4ac7acfe3e38bbef9eba59233ba7f6b9a (diff) |
[PATCH] add /sys/fs
This patch adds an empty /sys/fs, which filesystems can use.
Signed-off-by: Miklos Szeredi <miklos@szeredi.hu>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | fs/namespace.c | 5 | ||||
-rw-r--r-- | include/linux/fs.h | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/fs/namespace.c b/fs/namespace.c index 8bc15b362d23..ce97becff461 100644 --- a/fs/namespace.c +++ b/fs/namespace.c | |||
@@ -48,6 +48,10 @@ static int hash_mask __read_mostly, hash_bits __read_mostly; | |||
48 | static kmem_cache_t *mnt_cache; | 48 | static kmem_cache_t *mnt_cache; |
49 | static struct rw_semaphore namespace_sem; | 49 | static struct rw_semaphore namespace_sem; |
50 | 50 | ||
51 | /* /sys/fs */ | ||
52 | decl_subsys(fs, NULL, NULL); | ||
53 | EXPORT_SYMBOL_GPL(fs_subsys); | ||
54 | |||
51 | static inline unsigned long hash(struct vfsmount *mnt, struct dentry *dentry) | 55 | static inline unsigned long hash(struct vfsmount *mnt, struct dentry *dentry) |
52 | { | 56 | { |
53 | unsigned long tmp = ((unsigned long)mnt / L1_CACHE_BYTES); | 57 | unsigned long tmp = ((unsigned long)mnt / L1_CACHE_BYTES); |
@@ -1725,6 +1729,7 @@ void __init mnt_init(unsigned long mempages) | |||
1725 | i--; | 1729 | i--; |
1726 | } while (i); | 1730 | } while (i); |
1727 | sysfs_init(); | 1731 | sysfs_init(); |
1732 | subsystem_register(&fs_subsys); | ||
1728 | init_rootfs(); | 1733 | init_rootfs(); |
1729 | init_mount_tree(); | 1734 | init_mount_tree(); |
1730 | } | 1735 | } |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 552cedfa6064..b77f2608eef9 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1290,6 +1290,9 @@ extern void mnt_set_mountpoint(struct vfsmount *, struct dentry *, | |||
1290 | 1290 | ||
1291 | extern int vfs_statfs(struct super_block *, struct kstatfs *); | 1291 | extern int vfs_statfs(struct super_block *, struct kstatfs *); |
1292 | 1292 | ||
1293 | /* /sys/fs */ | ||
1294 | extern struct subsystem fs_subsys; | ||
1295 | |||
1293 | #define FLOCK_VERIFY_READ 1 | 1296 | #define FLOCK_VERIFY_READ 1 |
1294 | #define FLOCK_VERIFY_WRITE 2 | 1297 | #define FLOCK_VERIFY_WRITE 2 |
1295 | 1298 | ||