* [Fake patch 2.6.10-rc2-bk15] Hide sysfs_dirent definition
@ 2004-12-03 3:06 Adam J. Richter
2004-12-30 13:34 ` Maneesh Soni
0 siblings, 1 reply; 2+ messages in thread
From: Adam J. Richter @ 2004-12-03 3:06 UTC (permalink / raw)
To: maneesh; +Cc: akpm, chrisw, greg, linux-kernel, viro
struct sysfs_dirent is only used internally within fs/sysfs/,
as are the legals for sysfs_dirent.s_type. The following patch
moves these definitions from the public include/linux/sysfs.h to
the private fs/sysfs/sysfs.h, which is consistent with other
definitions for internal use within sysfs, such as struct
sysfs_symlink.
This patch makes it clearer that there are no external
dependencies on struct sysfs_dirent, and it also eliminates the
massive recompiles that I had to do every time I would change
something in sysfs_dirent.
Note that this is a fake patch generated against a
pristine 2.6.10-rc2-bk15 tree, because my tree has some other
changes in it that overlap. So, please test this patch. It
should produce exactly the same binaries as before. If the
patch seems OK, I would appreciate it if this patch could
be forwarded for integration into the stock kernels.
__ ______________
Adam J. Richter \ /
adam@yggdrasil.com | g g d r a s i l
diff -ur linux-2.6.10-rc2-bk15/fs/sysfs/sysfs.h linux/fs/sysfs/sysfs.h
--- linux-2.6.10-rc2-bk15/fs/sysfs/sysfs.h 2004-11-17 18:59:13.000000000 +0800
+++ linux/fs/sysfs/sysfs.h 2004-12-03 11:01:25.000000000 +0800
@@ -1,3 +1,20 @@
+struct sysfs_dirent {
+ atomic_t s_count;
+ struct list_head s_sibling;
+ struct list_head s_children;
+ void * s_element;
+ int s_type;
+ umode_t s_mode;
+ struct dentry * s_dentry;
+};
+
+#define SYSFS_ROOT 0x0001
+#define SYSFS_DIR 0x0002
+#define SYSFS_KOBJ_ATTR 0x0004
+#define SYSFS_KOBJ_BIN_ATTR 0x0008
+#define SYSFS_KOBJ_LINK 0x0020
+#define SYSFS_NOT_PINNED (SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR | SYSFS_KOBJ_LINK)
+
extern struct vfsmount * sysfs_mount;
diff -ur linux-2.6.10-rc2-bk15/include/linux/sysfs.h linux/include/linux/sysfs.h
--- linux-2.6.10-rc2-bk15/include/linux/sysfs.h 2004-11-17 18:59:17.000000000 +0800
+++ linux/include/linux/sysfs.h 2004-12-03 11:01:46.000000000 +0800
@@ -59,23 +59,6 @@
ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t);
};
-struct sysfs_dirent {
- atomic_t s_count;
- struct list_head s_sibling;
- struct list_head s_children;
- void * s_element;
- int s_type;
- umode_t s_mode;
- struct dentry * s_dentry;
-};
-
-#define SYSFS_ROOT 0x0001
-#define SYSFS_DIR 0x0002
-#define SYSFS_KOBJ_ATTR 0x0004
-#define SYSFS_KOBJ_BIN_ATTR 0x0008
-#define SYSFS_KOBJ_LINK 0x0020
-#define SYSFS_NOT_PINNED (SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR | SYSFS_KOBJ_LINK)
-
#ifdef CONFIG_SYSFS
extern int
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [Fake patch 2.6.10-rc2-bk15] Hide sysfs_dirent definition
2004-12-03 3:06 [Fake patch 2.6.10-rc2-bk15] Hide sysfs_dirent definition Adam J. Richter
@ 2004-12-30 13:34 ` Maneesh Soni
0 siblings, 0 replies; 2+ messages in thread
From: Maneesh Soni @ 2004-12-30 13:34 UTC (permalink / raw)
To: Adam J. Richter; +Cc: akpm, chrisw, greg, linux-kernel, viro
On Thu, Dec 02, 2004 at 07:06:07PM -0800, Adam J. Richter wrote:
> struct sysfs_dirent is only used internally within fs/sysfs/,
> as are the legals for sysfs_dirent.s_type. The following patch
> moves these definitions from the public include/linux/sysfs.h to
> the private fs/sysfs/sysfs.h, which is consistent with other
> definitions for internal use within sysfs, such as struct
> sysfs_symlink.
>
> This patch makes it clearer that there are no external
> dependencies on struct sysfs_dirent, and it also eliminates the
> massive recompiles that I had to do every time I would change
> something in sysfs_dirent.
>
> Note that this is a fake patch generated against a
> pristine 2.6.10-rc2-bk15 tree, because my tree has some other
> changes in it that overlap. So, please test this patch. It
> should produce exactly the same binaries as before. If the
> patch seems OK, I would appreciate it if this patch could
> be forwarded for integration into the stock kernels.
>
Agreed. No problem with this one.
Thanks
Maneesh
> __ ______________
> Adam J. Richter \ /
> adam@yggdrasil.com | g g d r a s i l
>
>
> diff -ur linux-2.6.10-rc2-bk15/fs/sysfs/sysfs.h linux/fs/sysfs/sysfs.h
> --- linux-2.6.10-rc2-bk15/fs/sysfs/sysfs.h 2004-11-17 18:59:13.000000000 +0800
> +++ linux/fs/sysfs/sysfs.h 2004-12-03 11:01:25.000000000 +0800
> @@ -1,3 +1,20 @@
> +struct sysfs_dirent {
> + atomic_t s_count;
> + struct list_head s_sibling;
> + struct list_head s_children;
> + void * s_element;
> + int s_type;
> + umode_t s_mode;
> + struct dentry * s_dentry;
> +};
> +
> +#define SYSFS_ROOT 0x0001
> +#define SYSFS_DIR 0x0002
> +#define SYSFS_KOBJ_ATTR 0x0004
> +#define SYSFS_KOBJ_BIN_ATTR 0x0008
> +#define SYSFS_KOBJ_LINK 0x0020
> +#define SYSFS_NOT_PINNED (SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR | SYSFS_KOBJ_LINK)
> +
>
> extern struct vfsmount * sysfs_mount;
>
> diff -ur linux-2.6.10-rc2-bk15/include/linux/sysfs.h linux/include/linux/sysfs.h
> --- linux-2.6.10-rc2-bk15/include/linux/sysfs.h 2004-11-17 18:59:17.000000000 +0800
> +++ linux/include/linux/sysfs.h 2004-12-03 11:01:46.000000000 +0800
> @@ -59,23 +59,6 @@
> ssize_t (*store)(struct kobject *,struct attribute *,const char *, size_t);
> };
>
> -struct sysfs_dirent {
> - atomic_t s_count;
> - struct list_head s_sibling;
> - struct list_head s_children;
> - void * s_element;
> - int s_type;
> - umode_t s_mode;
> - struct dentry * s_dentry;
> -};
> -
> -#define SYSFS_ROOT 0x0001
> -#define SYSFS_DIR 0x0002
> -#define SYSFS_KOBJ_ATTR 0x0004
> -#define SYSFS_KOBJ_BIN_ATTR 0x0008
> -#define SYSFS_KOBJ_LINK 0x0020
> -#define SYSFS_NOT_PINNED (SYSFS_KOBJ_ATTR | SYSFS_KOBJ_BIN_ATTR | SYSFS_KOBJ_LINK)
> -
> #ifdef CONFIG_SYSFS
>
> extern int
>
--
Maneesh Soni
Linux Technology Center,
IBM India Software Labs,
Bangalore, India
email: maneesh@in.ibm.com
Phone: 91-80-25044990
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-12-30 13:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-03 3:06 [Fake patch 2.6.10-rc2-bk15] Hide sysfs_dirent definition Adam J. Richter
2004-12-30 13:34 ` Maneesh Soni
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®