diff options
author | Christian Brauner <christian.brauner@ubuntu.com> | 2021-01-21 14:19:32 +0100 |
---|---|---|
committer | Christian Brauner <christian.brauner@ubuntu.com> | 2021-01-24 14:27:18 +0100 |
commit | 9fe61450972d3900bffb1dc26a17ebb9cdd92db2 (patch) | |
tree | 895d7d6485f03c01afa9f1b575e59878162f9373 /fs/overlayfs | |
parent | ba73d98745be1c10dc3cce68e8d7b95012d07d05 (diff) | |
download | linux-9fe61450972d3900bffb1dc26a17ebb9cdd92db2.tar.gz linux-9fe61450972d3900bffb1dc26a17ebb9cdd92db2.tar.bz2 linux-9fe61450972d3900bffb1dc26a17ebb9cdd92db2.zip |
namei: introduce struct renamedata
In order to handle idmapped mounts we will extend the vfs rename helper
to take two new arguments in follow up patches. Since this operations
already takes a bunch of arguments add a simple struct renamedata and
make the current helper use it before we extend it.
Link: https://lore.kernel.org/r/20210121131959.646623-14-christian.brauner@ubuntu.com
Cc: Christoph Hellwig <hch@lst.de>
Cc: David Howells <dhowells@redhat.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: linux-fsdevel@vger.kernel.org
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Diffstat (limited to 'fs/overlayfs')
-rw-r--r-- | fs/overlayfs/overlayfs.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h index 0002834f664a..426899681df7 100644 --- a/fs/overlayfs/overlayfs.h +++ b/fs/overlayfs/overlayfs.h @@ -214,9 +214,16 @@ static inline int ovl_do_rename(struct inode *olddir, struct dentry *olddentry, unsigned int flags) { int err; + struct renamedata rd = { + .old_dir = olddir, + .old_dentry = olddentry, + .new_dir = newdir, + .new_dentry = newdentry, + .flags = flags, + }; pr_debug("rename(%pd2, %pd2, 0x%x)\n", olddentry, newdentry, flags); - err = vfs_rename(olddir, olddentry, newdir, newdentry, NULL, flags); + err = vfs_rename(&rd); if (err) { pr_debug("...rename(%pd2, %pd2, ...) = %i\n", olddentry, newdentry, err); |