Skip to content

btrfs: stop duplicating VFS code for subvolume/snapshot dentry

[email protected] linux-btrfs linux-fsdevel 2 versions – Applied

Status from this message: Applied to the vfs-7.0.btrfs branch of the vfs/vfs.git tree.

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest4 patches 2 repliesApplied
  2. v14 patches 9 repliesSuperseded

Patches in v2 Applied

#Subject and filesSizeRepliesApplied
1/4fs: export may_delete() as may_delete_dentry()fs/namei.c include/linux/fs.h+12 -80 replies
2/4fs: export may_create() as may_create_dentry()fs/namei.c include/linux/fs.h+12 -90 replies
3/4btrfs: use may_delete_dentry() in btrfs_ioctl_snap_destroy()fs/btrfs/ioctl.c+1 -570 replies
4/4btrfs: use may_create_dentry() in btrfs_mksubvol()fs/btrfs/ioctl.c+1 -140 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchDavid Sterba
SeriesR-b
1/4
2/4
3/4
4/4

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

Read the v2 thread

Cover letter [PATCH v2 0/4] btrfs: stop duplicating VFS code for subvolume/snapshot dentry

From: Filipe Manana <[email protected]>

Currently btrfs has copies of two unexported functions from fs/namei.c used in the snapshot/subvolume creation and deletion. This patchset exports those functions and makes btrfs use them, to avoid duplication and the burden of keeping the copies up to date.

V2: Updated changelog of patch 4/4 to mention the btrfs copy misses a
call to audit_inode_child().

Link to V1: https://lore.kernel.org/linux-btrfs/[email protected]/

Filipe Manana (4):
fs: export may_delete() as may_delete_dentry()
fs: export may_create() as may_create_dentry()
btrfs: use may_delete_dentry() in btrfs_ioctl_snap_destroy()
btrfs: use may_create_dentry() in btrfs_mksubvol()

 fs/btrfs/ioctl.c   | 73 ++--------------------------------------------
 fs/namei.c         | 36 ++++++++++++-----------
 include/linux/fs.h |  5 ++++
 3 files changed, 26 insertions(+), 88 deletions(-)
Signature · 1 line
2.47.2