summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2025-01-24 14:19:40 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2025-02-01 18:37:53 +0100
commit753828d6775e9b2cff8d2b865beae65817fcc5eb (patch)
treee4382f91b6b07e4eb52ae3078e3be8b437d66bd2 /mm
parent3e716f31ff8b681f35927c95e12fc3874ed7dea7 (diff)
downloadlinux-753828d6775e9b2cff8d2b865beae65817fcc5eb.tar.gz
linux-753828d6775e9b2cff8d2b865beae65817fcc5eb.tar.bz2
linux-753828d6775e9b2cff8d2b865beae65817fcc5eb.zip
libfs: Add simple_offset_rename() API
[ Upstream commit 5a1a25be995e1014abd01600479915683e356f5c ] I'm about to fix a tmpfs rename bug that requires the use of internal simple_offset helpers that are not available in mm/shmem.c Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Link: https://lore.kernel.org/r/20240415152057.4605-3-cel@kernel.org Signed-off-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/shmem.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/mm/shmem.c b/mm/shmem.c
index aaf679976f3b..ab2b0e87b051 100644
--- a/mm/shmem.c
+++ b/mm/shmem.c
@@ -3434,8 +3434,7 @@ static int shmem_rename2(struct mnt_idmap *idmap,
return error;
}
- simple_offset_remove(shmem_get_offset_ctx(old_dir), old_dentry);
- error = simple_offset_add(shmem_get_offset_ctx(new_dir), old_dentry);
+ error = simple_offset_rename(old_dir, old_dentry, new_dir, new_dentry);
if (error)
return error;