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