[PATCH v1 0/2] Fix shmem_rename2 directory offset calculation

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

 



From: Chuck Lever <chuck.lever@xxxxxxxxxx>

The existing code in shmem_rename2() allocates a fresh directory
offset value when renaming over an existing destination entry. User
space does not expect this behavior. In particular, applications
that rename while walking a directory can loop indefinitely because
they never reach the end of the directory.

The first patch in this series corrects that problem, which exists
in v6.6 - current. The second patch is a clean-up and can be deferred
until v6.10.

Chuck Lever (2):
  shmem: Fix shmem_rename2()
  libfs: Clean up the simple_offset API

 fs/libfs.c         | 89 ++++++++++++++++++++++++++++++++++------------
 include/linux/fs.h | 10 +++---
 mm/shmem.c         | 17 +++++----
 3 files changed, 81 insertions(+), 35 deletions(-)

-- 
2.44.0





[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