Skip to content

Commit

Permalink
fs: port ->rename() to pass mnt_idmap
Browse files Browse the repository at this point in the history
Convert to struct mnt_idmap.

Last cycle we merged the necessary infrastructure in
256c8ae ("fs: introduce dedicated idmap type for mounts").
This is just the conversion to struct mnt_idmap.

Currently we still pass around the plain namespace that was attached to a
mount. This is in general pretty convenient but it makes it easy to
conflate namespaces that are relevant on the filesystem with namespaces
that are relevent on the mount level. Especially for non-vfs developers
without detailed knowledge in this area this can be a potential source for
bugs.

Once the conversion to struct mnt_idmap is done all helpers down to the
really low-level helpers will take a struct mnt_idmap argument instead of
two namespace arguments. This way it becomes impossible to conflate the two
eliminating the possibility of any bugs. All of the vfs and all filesystems
only operate on struct mnt_idmap.

Acked-by: Dave Chinner <[email protected]>
Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Christian Brauner (Microsoft) <[email protected]>
  • Loading branch information
brauner committed Jan 19, 2023
1 parent 5ebb29b commit e18275a
Show file tree
Hide file tree
Showing 52 changed files with 63 additions and 59 deletions.
2 changes: 1 addition & 1 deletion Documentation/filesystems/locking.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ prototypes::
int (*mkdir) (struct mnt_idmap *, struct inode *,struct dentry *,umode_t);
int (*rmdir) (struct inode *,struct dentry *);
int (*mknod) (struct mnt_idmap *, struct inode *,struct dentry *,umode_t,dev_t);
int (*rename) (struct inode *, struct dentry *,
int (*rename) (struct mnt_idmap *, struct inode *, struct dentry *,
struct inode *, struct dentry *, unsigned int);
int (*readlink) (struct dentry *, char __user *,int);
const char *(*get_link) (struct dentry *, struct inode *, struct delayed_call *);
Expand Down
2 changes: 1 addition & 1 deletion Documentation/filesystems/vfs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,7 @@ As of kernel 2.6.22, the following members are defined:
int (*mkdir) (struct mnt_idmap *, struct inode *,struct dentry *,umode_t);
int (*rmdir) (struct inode *,struct dentry *);
int (*mknod) (struct mnt_idmap *, struct inode *,struct dentry *,umode_t,dev_t);
int (*rename) (struct user_namespace *, struct inode *, struct dentry *,
int (*rename) (struct mnt_idmap *, struct inode *, struct dentry *,
struct inode *, struct dentry *, unsigned int);
int (*readlink) (struct dentry *, char __user *,int);
const char *(*get_link) (struct dentry *, struct inode *,
Expand Down
4 changes: 2 additions & 2 deletions drivers/android/binderfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ static inline bool is_binderfs_control_device(const struct dentry *dentry)
return info->control_dentry == dentry;
}

static int binderfs_rename(struct user_namespace *mnt_userns,
static int binderfs_rename(struct mnt_idmap *idmap,
struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry,
unsigned int flags)
Expand All @@ -361,7 +361,7 @@ static int binderfs_rename(struct user_namespace *mnt_userns,
is_binderfs_control_device(new_dentry))
return -EPERM;

return simple_rename(&init_user_ns, old_dir, old_dentry, new_dir,
return simple_rename(idmap, old_dir, old_dentry, new_dir,
new_dentry, flags);
}

Expand Down
2 changes: 1 addition & 1 deletion fs/9p/v9fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ extern struct dentry *v9fs_vfs_lookup(struct inode *dir, struct dentry *dentry,
unsigned int flags);
extern int v9fs_vfs_unlink(struct inode *i, struct dentry *d);
extern int v9fs_vfs_rmdir(struct inode *i, struct dentry *d);
extern int v9fs_vfs_rename(struct user_namespace *mnt_userns,
extern int v9fs_vfs_rename(struct mnt_idmap *idmap,
struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry,
unsigned int flags);
Expand Down
4 changes: 2 additions & 2 deletions fs/9p/vfs_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ int v9fs_vfs_rmdir(struct inode *i, struct dentry *d)

/**
* v9fs_vfs_rename - VFS hook to rename an inode
* @mnt_userns: The user namespace of the mount
* @idmap: The idmap of the mount
* @old_dir: old dir inode
* @old_dentry: old dentry
* @new_dir: new dir inode
Expand All @@ -918,7 +918,7 @@ int v9fs_vfs_rmdir(struct inode *i, struct dentry *d)
*/

int
v9fs_vfs_rename(struct user_namespace *mnt_userns, struct inode *old_dir,
v9fs_vfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
struct dentry *old_dentry, struct inode *new_dir,
struct dentry *new_dentry, unsigned int flags)
{
Expand Down
2 changes: 1 addition & 1 deletion fs/affs/affs.h
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ extern int affs_link(struct dentry *olddentry, struct inode *dir,
extern int affs_symlink(struct mnt_idmap *idmap,
struct inode *dir, struct dentry *dentry,
const char *symname);
extern int affs_rename2(struct user_namespace *mnt_userns,
extern int affs_rename2(struct mnt_idmap *idmap,
struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry,
unsigned int flags);
Expand Down
2 changes: 1 addition & 1 deletion fs/affs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,7 @@ affs_xrename(struct inode *old_dir, struct dentry *old_dentry,
return retval;
}

int affs_rename2(struct user_namespace *mnt_userns, struct inode *old_dir,
int affs_rename2(struct mnt_idmap *idmap, struct inode *old_dir,
struct dentry *old_dentry, struct inode *new_dir,
struct dentry *new_dentry, unsigned int flags)
{
Expand Down
4 changes: 2 additions & 2 deletions fs/afs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ static int afs_link(struct dentry *from, struct inode *dir,
struct dentry *dentry);
static int afs_symlink(struct mnt_idmap *idmap, struct inode *dir,
struct dentry *dentry, const char *content);
static int afs_rename(struct user_namespace *mnt_userns, struct inode *old_dir,
static int afs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
struct dentry *old_dentry, struct inode *new_dir,
struct dentry *new_dentry, unsigned int flags);
static bool afs_dir_release_folio(struct folio *folio, gfp_t gfp_flags);
Expand Down Expand Up @@ -1897,7 +1897,7 @@ static const struct afs_operation_ops afs_rename_operation = {
/*
* rename a file in an AFS filesystem and/or move it between directories
*/
static int afs_rename(struct user_namespace *mnt_userns, struct inode *old_dir,
static int afs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
struct dentry *old_dentry, struct inode *new_dir,
struct dentry *new_dentry, unsigned int flags)
{
Expand Down
2 changes: 1 addition & 1 deletion fs/bad_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static int bad_inode_mknod(struct mnt_idmap *idmap, struct inode *dir,
return -EIO;
}

static int bad_inode_rename2(struct user_namespace *mnt_userns,
static int bad_inode_rename2(struct mnt_idmap *idmap,
struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry,
unsigned int flags)
Expand Down
2 changes: 1 addition & 1 deletion fs/bfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ static int bfs_unlink(struct inode *dir, struct dentry *dentry)
return error;
}

static int bfs_rename(struct user_namespace *mnt_userns, struct inode *old_dir,
static int bfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
struct dentry *old_dentry, struct inode *new_dir,
struct dentry *new_dentry, unsigned int flags)
{
Expand Down
3 changes: 2 additions & 1 deletion fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -9547,10 +9547,11 @@ static int btrfs_rename(struct user_namespace *mnt_userns,
return ret;
}

static int btrfs_rename2(struct user_namespace *mnt_userns, struct inode *old_dir,
static int btrfs_rename2(struct mnt_idmap *idmap, struct inode *old_dir,
struct dentry *old_dentry, struct inode *new_dir,
struct dentry *new_dentry, unsigned int flags)
{
struct user_namespace *mnt_userns = mnt_idmap_owner(idmap);
int ret;

if (flags & ~(RENAME_NOREPLACE | RENAME_EXCHANGE | RENAME_WHITEOUT))
Expand Down
2 changes: 1 addition & 1 deletion fs/ceph/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1269,7 +1269,7 @@ static int ceph_unlink(struct inode *dir, struct dentry *dentry)
return err;
}

static int ceph_rename(struct user_namespace *mnt_userns, struct inode *old_dir,
static int ceph_rename(struct mnt_idmap *idmap, struct inode *old_dir,
struct dentry *old_dentry, struct inode *new_dir,
struct dentry *new_dentry, unsigned int flags)
{
Expand Down
2 changes: 1 addition & 1 deletion fs/cifs/cifsfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ extern int cifs_mknod(struct mnt_idmap *, struct inode *, struct dentry *,
extern int cifs_mkdir(struct mnt_idmap *, struct inode *, struct dentry *,
umode_t);
extern int cifs_rmdir(struct inode *, struct dentry *);
extern int cifs_rename2(struct user_namespace *, struct inode *,
extern int cifs_rename2(struct mnt_idmap *, struct inode *,
struct dentry *, struct inode *, struct dentry *,
unsigned int);
extern int cifs_revalidate_file_attr(struct file *filp);
Expand Down
2 changes: 1 addition & 1 deletion fs/cifs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2138,7 +2138,7 @@ cifs_do_rename(const unsigned int xid, struct dentry *from_dentry,
}

int
cifs_rename2(struct user_namespace *mnt_userns, struct inode *source_dir,
cifs_rename2(struct mnt_idmap *idmap, struct inode *source_dir,
struct dentry *source_dentry, struct inode *target_dir,
struct dentry *target_dentry, unsigned int flags)
{
Expand Down
2 changes: 1 addition & 1 deletion fs/coda/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ static int coda_rmdir(struct inode *dir, struct dentry *de)
}

/* rename */
static int coda_rename(struct user_namespace *mnt_userns, struct inode *old_dir,
static int coda_rename(struct mnt_idmap *idmap, struct inode *old_dir,
struct dentry *old_dentry, struct inode *new_dir,
struct dentry *new_dentry, unsigned int flags)
{
Expand Down
2 changes: 1 addition & 1 deletion fs/debugfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -837,7 +837,7 @@ struct dentry *debugfs_rename(struct dentry *old_dir, struct dentry *old_dentry,

take_dentry_name_snapshot(&old_name, old_dentry);

error = simple_rename(&init_user_ns, d_inode(old_dir), old_dentry,
error = simple_rename(&nop_mnt_idmap, d_inode(old_dir), old_dentry,
d_inode(new_dir), dentry, 0);
if (error) {
release_dentry_name_snapshot(&old_name);
Expand Down
2 changes: 1 addition & 1 deletion fs/ecryptfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ ecryptfs_mknod(struct mnt_idmap *idmap, struct inode *dir,
}

static int
ecryptfs_rename(struct user_namespace *mnt_userns, struct inode *old_dir,
ecryptfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
struct dentry *old_dentry, struct inode *new_dir,
struct dentry *new_dentry, unsigned int flags)
{
Expand Down
2 changes: 1 addition & 1 deletion fs/exfat/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1285,7 +1285,7 @@ static int __exfat_rename(struct inode *old_parent_inode,
return ret;
}

static int exfat_rename(struct user_namespace *mnt_userns,
static int exfat_rename(struct mnt_idmap *idmap,
struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry,
unsigned int flags)
Expand Down
2 changes: 1 addition & 1 deletion fs/ext2/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ static int ext2_rmdir (struct inode * dir, struct dentry *dentry)
return err;
}

static int ext2_rename (struct user_namespace * mnt_userns,
static int ext2_rename (struct mnt_idmap * idmap,
struct inode * old_dir, struct dentry * old_dentry,
struct inode * new_dir, struct dentry * new_dentry,
unsigned int flags)
Expand Down
3 changes: 2 additions & 1 deletion fs/ext4/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -4162,11 +4162,12 @@ static int ext4_cross_rename(struct inode *old_dir, struct dentry *old_dentry,
return retval;
}

static int ext4_rename2(struct user_namespace *mnt_userns,
static int ext4_rename2(struct mnt_idmap *idmap,
struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry,
unsigned int flags)
{
struct user_namespace *mnt_userns = mnt_idmap_owner(idmap);
int err;

if (unlikely(ext4_forced_shutdown(EXT4_SB(old_dir->i_sb))))
Expand Down
3 changes: 2 additions & 1 deletion fs/f2fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1299,11 +1299,12 @@ static int f2fs_cross_rename(struct inode *old_dir, struct dentry *old_dentry,
return err;
}

static int f2fs_rename2(struct user_namespace *mnt_userns,
static int f2fs_rename2(struct mnt_idmap *idmap,
struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry,
unsigned int flags)
{
struct user_namespace *mnt_userns = mnt_idmap_owner(idmap);
int err;

if (flags & ~(RENAME_NOREPLACE | RENAME_EXCHANGE | RENAME_WHITEOUT))
Expand Down
2 changes: 1 addition & 1 deletion fs/fat/namei_msdos.c
Original file line number Diff line number Diff line change
Expand Up @@ -594,7 +594,7 @@ static int do_msdos_rename(struct inode *old_dir, unsigned char *old_name,
}

/***** Rename, a wrapper for rename_same_dir & rename_diff_dir */
static int msdos_rename(struct user_namespace *mnt_userns,
static int msdos_rename(struct mnt_idmap *idmap,
struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry,
unsigned int flags)
Expand Down
2 changes: 1 addition & 1 deletion fs/fat/namei_vfat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1158,7 +1158,7 @@ static int vfat_rename_exchange(struct inode *old_dir, struct dentry *old_dentry
goto out;
}

static int vfat_rename2(struct user_namespace *mnt_userns, struct inode *old_dir,
static int vfat_rename2(struct mnt_idmap *idmap, struct inode *old_dir,
struct dentry *old_dentry, struct inode *new_dir,
struct dentry *new_dentry, unsigned int flags)
{
Expand Down
2 changes: 1 addition & 1 deletion fs/fuse/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -998,7 +998,7 @@ static int fuse_rename_common(struct inode *olddir, struct dentry *oldent,
return err;
}

static int fuse_rename2(struct user_namespace *mnt_userns, struct inode *olddir,
static int fuse_rename2(struct mnt_idmap *idmap, struct inode *olddir,
struct dentry *oldent, struct inode *newdir,
struct dentry *newent, unsigned int flags)
{
Expand Down
2 changes: 1 addition & 1 deletion fs/gfs2/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -1766,7 +1766,7 @@ static int gfs2_exchange(struct inode *odir, struct dentry *odentry,
return error;
}

static int gfs2_rename2(struct user_namespace *mnt_userns, struct inode *odir,
static int gfs2_rename2(struct mnt_idmap *idmap, struct inode *odir,
struct dentry *odentry, struct inode *ndir,
struct dentry *ndentry, unsigned int flags)
{
Expand Down
2 changes: 1 addition & 1 deletion fs/hfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -280,7 +280,7 @@ static int hfs_remove(struct inode *dir, struct dentry *dentry)
* new file/directory.
* XXX: how do you handle must_be dir?
*/
static int hfs_rename(struct user_namespace *mnt_userns, struct inode *old_dir,
static int hfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
struct dentry *old_dentry, struct inode *new_dir,
struct dentry *new_dentry, unsigned int flags)
{
Expand Down
2 changes: 1 addition & 1 deletion fs/hfsplus/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ static int hfsplus_mkdir(struct mnt_idmap *idmap, struct inode *dir,
return hfsplus_mknod(&nop_mnt_idmap, dir, dentry, mode | S_IFDIR, 0);
}

static int hfsplus_rename(struct user_namespace *mnt_userns,
static int hfsplus_rename(struct mnt_idmap *idmap,
struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry,
unsigned int flags)
Expand Down
2 changes: 1 addition & 1 deletion fs/hostfs/hostfs_kern.c
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ static int hostfs_mknod(struct mnt_idmap *idmap, struct inode *dir,
return err;
}

static int hostfs_rename2(struct user_namespace *mnt_userns,
static int hostfs_rename2(struct mnt_idmap *idmap,
struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry,
unsigned int flags)
Expand Down
2 changes: 1 addition & 1 deletion fs/hpfs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ const struct address_space_operations hpfs_symlink_aops = {
.read_folio = hpfs_symlink_read_folio
};

static int hpfs_rename(struct user_namespace *mnt_userns, struct inode *old_dir,
static int hpfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
struct dentry *old_dentry, struct inode *new_dir,
struct dentry *new_dentry, unsigned int flags)
{
Expand Down
4 changes: 2 additions & 2 deletions fs/jffs2/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static int jffs2_mkdir (struct mnt_idmap *, struct inode *,struct dentry *,
static int jffs2_rmdir (struct inode *,struct dentry *);
static int jffs2_mknod (struct mnt_idmap *, struct inode *,struct dentry *,
umode_t,dev_t);
static int jffs2_rename (struct user_namespace *, struct inode *,
static int jffs2_rename (struct mnt_idmap *, struct inode *,
struct dentry *, struct inode *, struct dentry *,
unsigned int);

Expand Down Expand Up @@ -762,7 +762,7 @@ static int jffs2_mknod (struct mnt_idmap *idmap, struct inode *dir_i,
return ret;
}

static int jffs2_rename (struct user_namespace *mnt_userns,
static int jffs2_rename (struct mnt_idmap *idmap,
struct inode *old_dir_i, struct dentry *old_dentry,
struct inode *new_dir_i, struct dentry *new_dentry,
unsigned int flags)
Expand Down
2 changes: 1 addition & 1 deletion fs/jfs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -1059,7 +1059,7 @@ static int jfs_symlink(struct mnt_idmap *idmap, struct inode *dip,
*
* FUNCTION: rename a file or directory
*/
static int jfs_rename(struct user_namespace *mnt_userns, struct inode *old_dir,
static int jfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
struct dentry *old_dentry, struct inode *new_dir,
struct dentry *new_dentry, unsigned int flags)
{
Expand Down
2 changes: 1 addition & 1 deletion fs/kernfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -1238,7 +1238,7 @@ static int kernfs_iop_rmdir(struct inode *dir, struct dentry *dentry)
return ret;
}

static int kernfs_iop_rename(struct user_namespace *mnt_userns,
static int kernfs_iop_rename(struct mnt_idmap *idmap,
struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry,
unsigned int flags)
Expand Down
2 changes: 1 addition & 1 deletion fs/libfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,7 @@ int simple_rename_exchange(struct inode *old_dir, struct dentry *old_dentry,
}
EXPORT_SYMBOL_GPL(simple_rename_exchange);

int simple_rename(struct user_namespace *mnt_userns, struct inode *old_dir,
int simple_rename(struct mnt_idmap *idmap, struct inode *old_dir,
struct dentry *old_dentry, struct inode *new_dir,
struct dentry *new_dentry, unsigned int flags)
{
Expand Down
2 changes: 1 addition & 1 deletion fs/minix/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ static int minix_rmdir(struct inode * dir, struct dentry *dentry)
return err;
}

static int minix_rename(struct user_namespace *mnt_userns,
static int minix_rename(struct mnt_idmap *idmap,
struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry,
unsigned int flags)
Expand Down
2 changes: 1 addition & 1 deletion fs/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -4786,7 +4786,7 @@ int vfs_rename(struct renamedata *rd)
if (error)
goto out;
}
error = old_dir->i_op->rename(new_mnt_userns, old_dir, old_dentry,
error = old_dir->i_op->rename(rd->new_mnt_idmap, old_dir, old_dentry,
new_dir, new_dentry, flags);
if (error)
goto out;
Expand Down
2 changes: 1 addition & 1 deletion fs/nfs/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -2642,7 +2642,7 @@ nfs_unblock_rename(struct rpc_task *task, struct nfs_renamedata *data)
* If these conditions are met, we can drop the dentries before doing
* the rename.
*/
int nfs_rename(struct user_namespace *mnt_userns, struct inode *old_dir,
int nfs_rename(struct mnt_idmap *idmap, struct inode *old_dir,
struct dentry *old_dentry, struct inode *new_dir,
struct dentry *new_dentry, unsigned int flags)
{
Expand Down
2 changes: 1 addition & 1 deletion fs/nfs/internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ int nfs_symlink(struct mnt_idmap *, struct inode *, struct dentry *,
int nfs_link(struct dentry *, struct inode *, struct dentry *);
int nfs_mknod(struct mnt_idmap *, struct inode *, struct dentry *, umode_t,
dev_t);
int nfs_rename(struct user_namespace *, struct inode *, struct dentry *,
int nfs_rename(struct mnt_idmap *, struct inode *, struct dentry *,
struct inode *, struct dentry *, unsigned int);

#ifdef CONFIG_NFS_V4_2
Expand Down
2 changes: 1 addition & 1 deletion fs/nilfs2/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,7 @@ static int nilfs_rmdir(struct inode *dir, struct dentry *dentry)
return err;
}

static int nilfs_rename(struct user_namespace *mnt_userns,
static int nilfs_rename(struct mnt_idmap *idmap,
struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry,
unsigned int flags)
Expand Down
Loading

0 comments on commit e18275a

Please sign in to comment.