Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932319AbXBPNqn (ORCPT ); Fri, 16 Feb 2007 08:46:43 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932333AbXBPNqn (ORCPT ); Fri, 16 Feb 2007 08:46:43 -0500 Received: from [221.217.24.227] ([221.217.24.227]:57062 "EHLO freya.yggdrasil.com" rhost-flags-FAIL-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S932319AbXBPNqm (ORCPT ); Fri, 16 Feb 2007 08:46:42 -0500 X-Greylist: delayed 417 seconds by postgrey-1.27 at vger.kernel.org; Fri, 16 Feb 2007 08:46:41 EST Date: Fri, 16 Feb 2007 21:35:25 +0800 From: "Adam J. Richter" To: gregkh@suse.de Cc: linux-kernel@vger.kernel.org Subject: Patch: move struct sysfs_dirent to private header Message-ID: <20070216213525.A9567@freya> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="nFreZHaLTZJo0R7j" Content-Disposition: inline User-Agent: Mutt/1.2i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2751 Lines: 95 --nFreZHaLTZJo0R7j Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi Greg, This is a resubmission of a patch that fell through the cracks long ago. I've posted it a couple of times, and don't recall anyone objecting to it. struct sysfs_dirent is private to the fs/sysfs/ subtree. It is not even referenced as an opaque structure outside of that subtree. The following patch moves the declaration from include/linux/sysfs.h to fs/sysfs/sysfs.h, making it clearer that nothing else in the kernel dereferences it. I have been running this patch for years. Please integrate and forward upstream if there are no objections. Note that while this patch was generated by stgit, it was not generated from a tree pulled from kernel.org, so perhaps a git command that thinks that this patch was generated from a common ancestor might get confused (I'm not sure). You may want to integrate it by running patch and checking in the change. The patch is against 2.6.20-git11. Adam Richter --nFreZHaLTZJo0R7j Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="sysfs-dirent.diff" Move struct sysfs_dirent from incude/linux/sysfs.h to fs/sysfs/sysfs.h From: <> --- src/fs/sysfs/sysfs.h | 11 +++++++++++ src/include/linux/sysfs.h | 12 ------------ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/src/fs/sysfs/sysfs.h b/src/fs/sysfs/sysfs.h index d976b00..a77c57e 100644 --- a/src/fs/sysfs/sysfs.h +++ b/src/fs/sysfs/sysfs.h @@ -1,3 +1,14 @@ +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; + struct iattr * s_iattr; + atomic_t s_event; +}; extern struct vfsmount * sysfs_mount; extern struct kmem_cache *sysfs_dir_cachep; diff --git a/src/include/linux/sysfs.h b/src/include/linux/sysfs.h index 192de3a..567cdca 100644 --- a/src/include/linux/sysfs.h +++ b/src/include/linux/sysfs.h @@ -68,18 +68,6 @@ struct sysfs_ops { 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; - struct iattr * s_iattr; - atomic_t s_event; -}; - #define SYSFS_ROOT 0x0001 #define SYSFS_DIR 0x0002 #define SYSFS_KOBJ_ATTR 0x0004 --nFreZHaLTZJo0R7j-- - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/