aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/fs.h
diff options
context:
space:
mode:
authorJeff Layton <jlayton@kernel.org>2023-07-05 14:58:11 -0400
committerChristian Brauner <brauner@kernel.org>2023-07-10 10:08:09 +0200
commit0c4767923ed6964d279309744cdb248890e95ec2 (patch)
tree5e4a2e5c52e83367ef45b53fe28aa1db9fd0c722 /include/linux/fs.h
parent9b6304c1d53745c300b86f202d0dcff395e2d2db (diff)
downloadlinux-0c4767923ed6964d279309744cdb248890e95ec2.tar.gz
fs: new helper: simple_rename_timestamp
A rename potentially involves updating 4 different inode timestamps. Add a function that handles the details sanely, and convert the libfs.c callers to use it. Signed-off-by: Jeff Layton <jlayton@kernel.org> Reviewed-by: Jan Kara <jack@suse.cz> Message-Id: <20230705185812.579118-3-jlayton@kernel.org> Signed-off-by: Christian Brauner <brauner@kernel.org>
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r--include/linux/fs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h
index d41bfcb26da03d..42755cb7d55be7 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -2977,6 +2977,8 @@ extern int simple_open(struct inode *inode, struct file *file);
extern int simple_link(struct dentry *, struct inode *, struct dentry *);
extern int simple_unlink(struct inode *, struct dentry *);
extern int simple_rmdir(struct inode *, struct dentry *);
+void simple_rename_timestamp(struct inode *old_dir, struct dentry *old_dentry,
+ struct inode *new_dir, struct dentry *new_dentry);
extern int simple_rename_exchange(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry);
extern int simple_rename(struct mnt_idmap *, struct inode *,