Skip to content

sysfs cleanups v3.

Eric W. Biederman linux-fsdevel linux-scsi lkml 1 version Applied

Status from this message: This is a note to let you know that I've just added the patch titled

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest26 patches 5 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/26sysfs: Implement sysfs_rename_linkfs/sysfs/symlink.c include/linux/sysfs.h+25 -01 reply
2/26driver core: Use sysfs_rename_link in device_renamedrivers/base/core.c+6 -121 reply
3/26sysfs: Remove now unnecessary error reporting suppression.fs/sysfs/dir.c fs/sysfs/symlink.c fs/sysfs/sysfs.h+21 -761 reply
4/26sysfs: sysfs_remove_dir stop checking for bogus cases.fs/sysfs/dir.c+0 -32 replies
5/26sysfs: Improve sysfs directory deletion debugging.fs/sysfs/dir.c+19 -40 replies
6/26sysfs: Don't hold addrm_start/addrm_finish over multiple removals.fs/sysfs/dir.c+25 -110 replies
7/26sysfs: Rename sysfs_d_iput to sysfs_dentry_iputfs/sysfs/dir.c+2 -20 replies
8/26sysfs: Use dentry_ops instead of directly playing with the dcachefs/sysfs/dir.c+46 -270 replies
9/26sysfs: Simplify sysfs_chmod_file semanticsfs/sysfs/file.c+1 -90 replies
10/26sysfs: Optimize just changing the sysfs file mode.fs/sysfs/inode.c+14 -80 replies
11/26sysfs: Simplify iattr assignmentsfs/sysfs/inode.c+3 -60 replies
12/26sysfs: Fix locking and factor out sysfs_sd_setattrfs/sysfs/inode.c fs/sysfs/sysfs.h+31 -220 replies
13/26sysfs: Update s_iattr on link and unlink.fs/sysfs/dir.c+14 -00 replies
14/26sysfs: Nicely indent sysfs_symlink_inode_operationsfs/sysfs/symlink.c+3 -30 replies
15/26sysfs: Implement sysfs_getattr & sysfs_permissionfs/sysfs/dir.c fs/sysfs/inode.c fs/sysfs/symlink.c +1 more+49 -120 replies
16/26sysfs: In sysfs_chmod_file lazily propagate the mode change.fs/sysfs/file.c+8 -230 replies
17/26sysfs: Kill sysfs_addrm_start and sysfs_addrm_finishfs/sysfs/dir.c fs/sysfs/file.c fs/sysfs/inode.c +2 more+34 -2050 replies
18/26sysfs: Propagate renames to the vfs on demandfs/namei.c fs/sysfs/dir.c fs/sysfs/inode.c +2 more+32 -1600 replies
19/26sysfs: Merge sysfs_rename_dir and sysfs_move_dirfs/sysfs/dir.c+28 -380 replies
20/26sysfs: Pass super_block to sysfs_get_inodefs/sysfs/dir.c fs/sysfs/inode.c fs/sysfs/mount.c +1 more+6 -50 replies
21/26sysfs: Kill unused sysfs_sb variable.fs/sysfs/mount.c fs/sysfs/sysfs.h+0 -30 replies
22/26sysfs: Normalize error handling in sysfs_fill_inodefs/sysfs/mount.c+11 -50 replies
23/26sysfs: Rename sysfs_mv_dir sysfs_renamefs/sysfs/dir.c fs/sysfs/sysfs.h+6 -30 replies
24/26sysfs: Make sysfs_rename_link atomicfs/sysfs/symlink.c+24 -20 replies
25/26driver core: Don't remove kobjects in device_shutdown.drivers/base/core.c+0 -30 replies
26/26sysfs: In sysfs_add_one fail if the targe directory has been removed.fs/sysfs/dir.c+22 -130 replies

Reviews trailers per patch

18 of 26 patches have a Reviewed-by or Acked-by.

PatchTejun HeoKay Sievers
1/26
2/26
3/26
4/26
5/26
6/26
7/26A-b
8/26A-b
9/26A-b
10/26
11/26A-b
12/26A-b
13/26A-b
14/26A-b
15/26A-b
16/26A-b
17/26A-b
18/26A-b
19/26A-b
20/26A-b
21/26A-b
22/26A-b
23/26
24/26A-b A-b
25/26A-b
26/26A-b A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/26] sysfs cleanups v3.

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