linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v1 0/2] Fix shmem_rename2 directory offset calculation
@ 2024-04-11 18:26 cel
  2024-04-11 18:26 ` [PATCH v1 1/2] shmem: Fix shmem_rename2() cel
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: cel @ 2024-04-11 18:26 UTC (permalink / raw)
  To: Christian Brauner; +Cc: linux-fsdevel, Chuck Lever

From: Chuck Lever <chuck.lever@oracle.com>

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2024-04-15 14:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-11 18:26 [PATCH v1 0/2] Fix shmem_rename2 directory offset calculation cel
2024-04-11 18:26 ` [PATCH v1 1/2] shmem: Fix shmem_rename2() cel
2024-04-11 18:26 ` [PATCH v1 2/2] libfs: Clean up the simple_offset API cel
2024-04-12 14:29 ` [PATCH v1 0/2] Fix shmem_rename2 directory offset calculation Chuck Lever
2024-04-15 14:48   ` Christian Brauner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).