LWN.net Logo

sysfs cleanups v3.

From:  ebiederm@xmission.com (Eric W. Biederman)
To:  Greg KH <gregkh@suse.de>
Subject:  [PATCH 0/26] sysfs cleanups v3.
Date:  Fri, 29 May 2009 13:18:35 -0700
Message-ID:  <m1r5y73bok.fsf_-_@fess.ebiederm.org>
Cc:  Kay Sievers <kay.sievers@vrfy.org>, Greg KH <greg@kroah.com>, Andrew Morton <akpm@linux-foundation.org>, linux-kernel@vger.kernel.org, Tejun Heo <tj@kernel.org>, Cornelia Huck <cornelia.huck@de.ibm.com>, linux-fsdevel@vger.kernel.org, "Eric W. Biederman" <ebiederm@aristanetworks.com>
Archive-link:  Article, Thread


Here is the third respin of my sysfs patches.

Tejun had a good point I was doing to much when I touched __sysfs_read_dir.
So that work has been split into 3 patches.

This made a good excuse for me to review the if (!dir_sd) check and be
certain it was not needed.  I have not found any actual problems so
the resulting code is the same as the last patchset.

Now the change to delete each dirent in sysfs_read_dir is it's own
separate patch so Tejun can happily beat me up on just that one idea.
I honestly can't see how holding sysfs_mutex over the entire directory
deletion helps anything.

The net change is less buggy than the current sysfs and a fair bit simpler.

 git-diff-tree --stat v2.6.30-rc5..HEAD
 drivers/base/core.c   |   21 +--
 fs/namei.c            |   22 --
 fs/sysfs/dir.c        |  596 ++++++++++++++++---------------------------------
 fs/sysfs/file.c       |   47 +---
 fs/sysfs/inode.c      |  154 ++++++++------
 fs/sysfs/mount.c      |   20 +-
 fs/sysfs/symlink.c    |   93 +++++----
 fs/sysfs/sysfs.h      |   28 +--
 include/linux/namei.h |    1 -
 include/linux/sysfs.h |    9 +
 10 files changed, 383 insertions(+), 608 deletions(-)


Eric
--
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/

Copyright © 2009, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds