[PATCHES][RFC][CFT] simple_recursive_removal() work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[another part of tree-in-dcache pile pulled into a separate branch]

	Removing subtrees of kernel filesystems is done in quite a few
places; unfortunately, it's easy to get wrong.	A number of open-coded
attempts are out there, with varying amount of bogosities.

	simple_recursive_removal() had been introduced for doing that with
all precautions needed; it does an equivalent of rm -rf, with sufficient
locking, eviction of anything mounted on top of the subtree, etc.

	The series below converts a bunch of open-coded instances
to using that.  It's v6.16-rc1-based, lives in
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git #work.simple_recursive_removal
Individual patches in followups.

The first commit is shared with work.rpc_pipe (and several other branches);
the rest has not been posted yet.  If there's no objections, into -next
it goes...

Shortlog:
Al Viro(8)
      simple_recursive_removal(): saner interaction with fsnotify
      add locked_recursive_removal()
      spufs: switch to locked_recursive_removal()
      binfmt_misc: switch to locked_recursive_removal()
      pstore: switch to locked_recursive_removal()
      fuse_ctl: use simple_recursive_removal()
      kill binderfs_remove_file()
      functionfs, gadgetfs: use simple_recursive_removal()

Diffstat:
 arch/powerpc/platforms/cell/spufs/inode.c | 49 ++++++-------------------------
 drivers/android/binder.c                  |  2 +-
 drivers/android/binder_internal.h         |  2 --
 drivers/android/binderfs.c                | 15 ----------
 drivers/usb/gadget/function/f_fs.c        |  3 +-
 drivers/usb/gadget/legacy/inode.c         |  7 +----
 fs/binfmt_misc.c                          | 40 +------------------------
 fs/fuse/control.c                         | 30 ++++++++-----------
 fs/fuse/fuse_i.h                          |  6 ----
 fs/libfs.c                                | 29 +++++++++++++-----
 fs/pstore/inode.c                         |  3 +-
 include/linux/fs.h                        |  2 ++
 12 files changed, 50 insertions(+), 138 deletions(-)




[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [NTFS 3]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [NTFS 3]     [Samba]     [Device Mapper]     [CEPH Development]

  Powered by Linux