Skip to contentSkip to conversation

rename fixes

GIT PULL Merged Al Viro 2 participants 2 messages Jan 11, 2024 – Jan 12, 2024 VFS

lore
Share & tools
lore

Al Viro

author maintainer
#0 lore raw

The following changes since commit 4a0b33f771db2b82fdfad08b9f34def786162865:

selinux: saner handling of policy reloads (2023-11-16 12:45:33 -0500)

are available in the Git repository at:

git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs.git tags/pull-rename

for you to fetch changes up to a8b0026847b8c43445c921ad2c85521c92eb175f:

rename(): avoid a deadlock in the case of parents having no common ancestor (2023-11-25 02:54:14 -0500)

Two trivial conflicts - in Documentation/filesystems/porting.rst and in fs/overlayfs/copy_up.c. The former is "append vs. append", the latter - dput(temp) added by overlayfs tree inside an if () with condition slightly massaged in this branch.

----------------------------------------------------------------
fix directory locking scheme on rename

broken in 6.5; we really can't lock two unrelated directories without holding ->s_vfs_rename_mutex first and in case of same-parent rename of a subdirectory 6.5 ends up doing just that.

----------------------------------------------------------------
Al Viro (5):
udf_rename(): only access the child content on cross-directory rename
ext4: don't access the source subdirectory content on same-directory rename rename(): fix the locking of subdirectories
kill lock_two_inodes()
rename(): avoid a deadlock in the case of parents having no common ancestor

Jan Kara (4):
reiserfs: Avoid touching renamed directory if parent does not change
ocfs2: Avoid touching renamed directory if parent does not change
ext2: Avoid reading renamed directory if parent does not change
f2fs: Avoid reading renamed directory if parent does not change

 Documentation/filesystems/directory-locking.rst | 349 +++++++++++++++++-------
 Documentation/filesystems/locking.rst           |   5 +-
 Documentation/filesystems/porting.rst           |  27 ++
 fs/cachefiles/namei.c                           |   2 +
 fs/ecryptfs/inode.c                             |   2 +
 fs/ext2/namei.c                                 |  11 +-
 fs/ext4/namei.c                                 |  21 +-
 fs/f2fs/namei.c                                 |  15 +-
 fs/inode.c                                      |  49 +---
 fs/internal.h                                   |   2 -
 fs/namei.c                                      |  87 ++++--
 fs/nfsd/vfs.c                                   |   4 +
 fs/ocfs2/namei.c                                |   8 +-
 fs/overlayfs/copy_up.c                          |   9 +-
 fs/overlayfs/dir.c                              |   4 +
 fs/overlayfs/super.c                            |   6 +-
 fs/overlayfs/util.c                             |   7 +-
 fs/reiserfs/namei.c                             |  54 ++--
 fs/smb/server/vfs.c                             |   5 +
 fs/udf/namei.c                                  |   7 +-
 20 files changed, 442 insertions(+), 232 deletions(-)