Re: [Patch?] Teach sysfs_get_name not to use a dentry
From: Al Viro
Date: Thu Dec 02 2004 - 02:02:15 EST
On Wed, Dec 01, 2004 at 10:41:08PM -0800, Adam J. Richter wrote:
> Hi Maneesh,
>
> The following patch changes syfs_getname to avoid using
> sysfs_dirent->s_dentry for getting the names of directories (as
> this pointer may be NULL in a future version where sysfs would
> be able to release the inode and dentry for each sysfs directory).
> It does so by defining different sysfs_dirent.s_type values depending
> on whether the diretory represents a kobject or an attribute_group.
>
> This patch is ground work for unpinning the struct inode
> and struct dentry used by each sysfs directory. The patch also may
> facilitate eliminating the sysfs_dentry for each member of an
> attribute group. The patch has no benefits by itself, but I'm posting
> it now separately in the hopes of making it easier for people
> to spot problems, and, also, because if it is integrated, I think
> it will make the rest of the change to unpin directories (which
> I have not yet written) easier to understand.
Vetoed until you show an acceptable locking scheme for the latter.
I do not believe that it's feasible; feel free to prove me wrong,
but until then you'll have to carry the patchset on your own.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/