fs: rename "rename2" i_op to "rename"
Generated patch: sed -i "s/\.rename2\t/\.rename\t\t/" `git grep -wl rename2` sed -i "s/\brename2\b/rename/g" `git grep -wl rename2` Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
This commit is contained in:
parent
18fc84dafa
commit
2773bf00ae
|
@ -50,7 +50,7 @@ prototypes:
|
||||||
int (*mkdir) (struct inode *,struct dentry *,umode_t);
|
int (*mkdir) (struct inode *,struct dentry *,umode_t);
|
||||||
int (*rmdir) (struct inode *,struct dentry *);
|
int (*rmdir) (struct inode *,struct dentry *);
|
||||||
int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t);
|
int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t);
|
||||||
int (*rename2) (struct inode *, struct dentry *,
|
int (*rename) (struct inode *, struct dentry *,
|
||||||
struct inode *, struct dentry *, unsigned int);
|
struct inode *, struct dentry *, unsigned int);
|
||||||
int (*readlink) (struct dentry *, char __user *,int);
|
int (*readlink) (struct dentry *, char __user *,int);
|
||||||
const char *(*get_link) (struct dentry *, struct inode *, void **);
|
const char *(*get_link) (struct dentry *, struct inode *, void **);
|
||||||
|
@ -81,7 +81,7 @@ symlink: yes
|
||||||
mkdir: yes
|
mkdir: yes
|
||||||
unlink: yes (both)
|
unlink: yes (both)
|
||||||
rmdir: yes (both) (see below)
|
rmdir: yes (both) (see below)
|
||||||
rename2: yes (all) (see below)
|
rename: yes (all) (see below)
|
||||||
readlink: no
|
readlink: no
|
||||||
get_link: no
|
get_link: no
|
||||||
setattr: yes
|
setattr: yes
|
||||||
|
@ -99,7 +99,7 @@ tmpfile: no
|
||||||
|
|
||||||
Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on
|
Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on
|
||||||
victim.
|
victim.
|
||||||
cross-directory ->rename2() has (per-superblock) ->s_vfs_rename_sem.
|
cross-directory ->rename() has (per-superblock) ->s_vfs_rename_sem.
|
||||||
|
|
||||||
See Documentation/filesystems/directory-locking for more detailed discussion
|
See Documentation/filesystems/directory-locking for more detailed discussion
|
||||||
of the locking scheme for directory operations.
|
of the locking scheme for directory operations.
|
||||||
|
|
|
@ -345,7 +345,7 @@ struct inode_operations {
|
||||||
int (*mkdir) (struct inode *,struct dentry *,umode_t);
|
int (*mkdir) (struct inode *,struct dentry *,umode_t);
|
||||||
int (*rmdir) (struct inode *,struct dentry *);
|
int (*rmdir) (struct inode *,struct dentry *);
|
||||||
int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t);
|
int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t);
|
||||||
int (*rename2) (struct inode *, struct dentry *,
|
int (*rename) (struct inode *, struct dentry *,
|
||||||
struct inode *, struct dentry *, unsigned int);
|
struct inode *, struct dentry *, unsigned int);
|
||||||
int (*readlink) (struct dentry *, char __user *,int);
|
int (*readlink) (struct dentry *, char __user *,int);
|
||||||
const char *(*get_link) (struct dentry *, struct inode *,
|
const char *(*get_link) (struct dentry *, struct inode *,
|
||||||
|
|
|
@ -1106,7 +1106,7 @@ const struct inode_operations ll_dir_inode_operations = {
|
||||||
.rmdir = ll_rmdir,
|
.rmdir = ll_rmdir,
|
||||||
.symlink = ll_symlink,
|
.symlink = ll_symlink,
|
||||||
.link = ll_link,
|
.link = ll_link,
|
||||||
.rename2 = ll_rename,
|
.rename = ll_rename,
|
||||||
.setattr = ll_setattr,
|
.setattr = ll_setattr,
|
||||||
.getattr = ll_getattr,
|
.getattr = ll_getattr,
|
||||||
.permission = ll_inode_permission,
|
.permission = ll_inode_permission,
|
||||||
|
|
|
@ -1440,7 +1440,7 @@ static const struct inode_operations v9fs_dir_inode_operations_dotu = {
|
||||||
.mkdir = v9fs_vfs_mkdir,
|
.mkdir = v9fs_vfs_mkdir,
|
||||||
.rmdir = v9fs_vfs_rmdir,
|
.rmdir = v9fs_vfs_rmdir,
|
||||||
.mknod = v9fs_vfs_mknod,
|
.mknod = v9fs_vfs_mknod,
|
||||||
.rename2 = v9fs_vfs_rename,
|
.rename = v9fs_vfs_rename,
|
||||||
.getattr = v9fs_vfs_getattr,
|
.getattr = v9fs_vfs_getattr,
|
||||||
.setattr = v9fs_vfs_setattr,
|
.setattr = v9fs_vfs_setattr,
|
||||||
};
|
};
|
||||||
|
@ -1453,7 +1453,7 @@ static const struct inode_operations v9fs_dir_inode_operations = {
|
||||||
.mkdir = v9fs_vfs_mkdir,
|
.mkdir = v9fs_vfs_mkdir,
|
||||||
.rmdir = v9fs_vfs_rmdir,
|
.rmdir = v9fs_vfs_rmdir,
|
||||||
.mknod = v9fs_vfs_mknod,
|
.mknod = v9fs_vfs_mknod,
|
||||||
.rename2 = v9fs_vfs_rename,
|
.rename = v9fs_vfs_rename,
|
||||||
.getattr = v9fs_vfs_getattr,
|
.getattr = v9fs_vfs_getattr,
|
||||||
.setattr = v9fs_vfs_setattr,
|
.setattr = v9fs_vfs_setattr,
|
||||||
};
|
};
|
||||||
|
|
|
@ -964,7 +964,7 @@ const struct inode_operations v9fs_dir_inode_operations_dotl = {
|
||||||
.mkdir = v9fs_vfs_mkdir_dotl,
|
.mkdir = v9fs_vfs_mkdir_dotl,
|
||||||
.rmdir = v9fs_vfs_rmdir,
|
.rmdir = v9fs_vfs_rmdir,
|
||||||
.mknod = v9fs_vfs_mknod_dotl,
|
.mknod = v9fs_vfs_mknod_dotl,
|
||||||
.rename2 = v9fs_vfs_rename,
|
.rename = v9fs_vfs_rename,
|
||||||
.getattr = v9fs_vfs_getattr_dotl,
|
.getattr = v9fs_vfs_getattr_dotl,
|
||||||
.setattr = v9fs_vfs_setattr_dotl,
|
.setattr = v9fs_vfs_setattr_dotl,
|
||||||
.setxattr = generic_setxattr,
|
.setxattr = generic_setxattr,
|
||||||
|
|
|
@ -35,7 +35,7 @@ const struct inode_operations affs_dir_inode_operations = {
|
||||||
.symlink = affs_symlink,
|
.symlink = affs_symlink,
|
||||||
.mkdir = affs_mkdir,
|
.mkdir = affs_mkdir,
|
||||||
.rmdir = affs_rmdir,
|
.rmdir = affs_rmdir,
|
||||||
.rename2 = affs_rename,
|
.rename = affs_rename,
|
||||||
.setattr = affs_notify_change,
|
.setattr = affs_notify_change,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -57,7 +57,7 @@ const struct inode_operations afs_dir_inode_operations = {
|
||||||
.symlink = afs_symlink,
|
.symlink = afs_symlink,
|
||||||
.mkdir = afs_mkdir,
|
.mkdir = afs_mkdir,
|
||||||
.rmdir = afs_rmdir,
|
.rmdir = afs_rmdir,
|
||||||
.rename2 = afs_rename,
|
.rename = afs_rename,
|
||||||
.permission = afs_permission,
|
.permission = afs_permission,
|
||||||
.getattr = afs_getattr,
|
.getattr = afs_getattr,
|
||||||
.setattr = afs_setattr,
|
.setattr = afs_setattr,
|
||||||
|
|
|
@ -133,7 +133,7 @@ static const struct inode_operations bad_inode_ops =
|
||||||
.mkdir = bad_inode_mkdir,
|
.mkdir = bad_inode_mkdir,
|
||||||
.rmdir = bad_inode_rmdir,
|
.rmdir = bad_inode_rmdir,
|
||||||
.mknod = bad_inode_mknod,
|
.mknod = bad_inode_mknod,
|
||||||
.rename2 = bad_inode_rename2,
|
.rename = bad_inode_rename2,
|
||||||
.readlink = bad_inode_readlink,
|
.readlink = bad_inode_readlink,
|
||||||
/* follow_link must be no-op, otherwise unmounting this inode
|
/* follow_link must be no-op, otherwise unmounting this inode
|
||||||
won't work */
|
won't work */
|
||||||
|
|
|
@ -274,7 +274,7 @@ const struct inode_operations bfs_dir_inops = {
|
||||||
.lookup = bfs_lookup,
|
.lookup = bfs_lookup,
|
||||||
.link = bfs_link,
|
.link = bfs_link,
|
||||||
.unlink = bfs_unlink,
|
.unlink = bfs_unlink,
|
||||||
.rename2 = bfs_rename,
|
.rename = bfs_rename,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int bfs_add_entry(struct inode *dir, const unsigned char *name,
|
static int bfs_add_entry(struct inode *dir, const unsigned char *name,
|
||||||
|
|
|
@ -10566,7 +10566,7 @@ static const struct inode_operations btrfs_dir_inode_operations = {
|
||||||
.link = btrfs_link,
|
.link = btrfs_link,
|
||||||
.mkdir = btrfs_mkdir,
|
.mkdir = btrfs_mkdir,
|
||||||
.rmdir = btrfs_rmdir,
|
.rmdir = btrfs_rmdir,
|
||||||
.rename2 = btrfs_rename2,
|
.rename = btrfs_rename2,
|
||||||
.symlink = btrfs_symlink,
|
.symlink = btrfs_symlink,
|
||||||
.setattr = btrfs_setattr,
|
.setattr = btrfs_setattr,
|
||||||
.mknod = btrfs_mknod,
|
.mknod = btrfs_mknod,
|
||||||
|
|
|
@ -804,7 +804,7 @@ struct dentry *cachefiles_get_directory(struct cachefiles_cache *cache,
|
||||||
!d_backing_inode(subdir)->i_op->lookup ||
|
!d_backing_inode(subdir)->i_op->lookup ||
|
||||||
!d_backing_inode(subdir)->i_op->mkdir ||
|
!d_backing_inode(subdir)->i_op->mkdir ||
|
||||||
!d_backing_inode(subdir)->i_op->create ||
|
!d_backing_inode(subdir)->i_op->create ||
|
||||||
!d_backing_inode(subdir)->i_op->rename2 ||
|
!d_backing_inode(subdir)->i_op->rename ||
|
||||||
!d_backing_inode(subdir)->i_op->rmdir ||
|
!d_backing_inode(subdir)->i_op->rmdir ||
|
||||||
!d_backing_inode(subdir)->i_op->unlink)
|
!d_backing_inode(subdir)->i_op->unlink)
|
||||||
goto check_error;
|
goto check_error;
|
||||||
|
|
|
@ -1502,7 +1502,7 @@ const struct inode_operations ceph_dir_iops = {
|
||||||
.link = ceph_link,
|
.link = ceph_link,
|
||||||
.unlink = ceph_unlink,
|
.unlink = ceph_unlink,
|
||||||
.rmdir = ceph_unlink,
|
.rmdir = ceph_unlink,
|
||||||
.rename2 = ceph_rename,
|
.rename = ceph_rename,
|
||||||
.create = ceph_create,
|
.create = ceph_create,
|
||||||
.atomic_open = ceph_atomic_open,
|
.atomic_open = ceph_atomic_open,
|
||||||
};
|
};
|
||||||
|
@ -1513,7 +1513,7 @@ const struct inode_operations ceph_snapdir_iops = {
|
||||||
.getattr = ceph_getattr,
|
.getattr = ceph_getattr,
|
||||||
.mkdir = ceph_mkdir,
|
.mkdir = ceph_mkdir,
|
||||||
.rmdir = ceph_unlink,
|
.rmdir = ceph_unlink,
|
||||||
.rename2 = ceph_rename,
|
.rename = ceph_rename,
|
||||||
};
|
};
|
||||||
|
|
||||||
const struct dentry_operations ceph_dentry_ops = {
|
const struct dentry_operations ceph_dentry_ops = {
|
||||||
|
|
|
@ -896,7 +896,7 @@ const struct inode_operations cifs_dir_inode_ops = {
|
||||||
.link = cifs_hardlink,
|
.link = cifs_hardlink,
|
||||||
.mkdir = cifs_mkdir,
|
.mkdir = cifs_mkdir,
|
||||||
.rmdir = cifs_rmdir,
|
.rmdir = cifs_rmdir,
|
||||||
.rename2 = cifs_rename2,
|
.rename = cifs_rename2,
|
||||||
.permission = cifs_permission,
|
.permission = cifs_permission,
|
||||||
.setattr = cifs_setattr,
|
.setattr = cifs_setattr,
|
||||||
.symlink = cifs_symlink,
|
.symlink = cifs_symlink,
|
||||||
|
|
|
@ -573,7 +573,7 @@ const struct inode_operations coda_dir_inode_operations = {
|
||||||
.mkdir = coda_mkdir,
|
.mkdir = coda_mkdir,
|
||||||
.rmdir = coda_rmdir,
|
.rmdir = coda_rmdir,
|
||||||
.mknod = CODA_EIO_ERROR,
|
.mknod = CODA_EIO_ERROR,
|
||||||
.rename2 = coda_rename,
|
.rename = coda_rename,
|
||||||
.permission = coda_permission,
|
.permission = coda_permission,
|
||||||
.getattr = coda_getattr,
|
.getattr = coda_getattr,
|
||||||
.setattr = coda_setattr,
|
.setattr = coda_setattr,
|
||||||
|
|
|
@ -1108,7 +1108,7 @@ const struct inode_operations ecryptfs_dir_iops = {
|
||||||
.mkdir = ecryptfs_mkdir,
|
.mkdir = ecryptfs_mkdir,
|
||||||
.rmdir = ecryptfs_rmdir,
|
.rmdir = ecryptfs_rmdir,
|
||||||
.mknod = ecryptfs_mknod,
|
.mknod = ecryptfs_mknod,
|
||||||
.rename2 = ecryptfs_rename,
|
.rename = ecryptfs_rename,
|
||||||
.permission = ecryptfs_permission,
|
.permission = ecryptfs_permission,
|
||||||
.setattr = ecryptfs_setattr,
|
.setattr = ecryptfs_setattr,
|
||||||
.setxattr = ecryptfs_setxattr,
|
.setxattr = ecryptfs_setxattr,
|
||||||
|
|
|
@ -314,7 +314,7 @@ const struct inode_operations exofs_dir_inode_operations = {
|
||||||
.mkdir = exofs_mkdir,
|
.mkdir = exofs_mkdir,
|
||||||
.rmdir = exofs_rmdir,
|
.rmdir = exofs_rmdir,
|
||||||
.mknod = exofs_mknod,
|
.mknod = exofs_mknod,
|
||||||
.rename2 = exofs_rename,
|
.rename = exofs_rename,
|
||||||
.setattr = exofs_setattr,
|
.setattr = exofs_setattr,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -430,7 +430,7 @@ const struct inode_operations ext2_dir_inode_operations = {
|
||||||
.mkdir = ext2_mkdir,
|
.mkdir = ext2_mkdir,
|
||||||
.rmdir = ext2_rmdir,
|
.rmdir = ext2_rmdir,
|
||||||
.mknod = ext2_mknod,
|
.mknod = ext2_mknod,
|
||||||
.rename2 = ext2_rename,
|
.rename = ext2_rename,
|
||||||
#ifdef CONFIG_EXT2_FS_XATTR
|
#ifdef CONFIG_EXT2_FS_XATTR
|
||||||
.setxattr = generic_setxattr,
|
.setxattr = generic_setxattr,
|
||||||
.getxattr = generic_getxattr,
|
.getxattr = generic_getxattr,
|
||||||
|
|
|
@ -3880,7 +3880,7 @@ const struct inode_operations ext4_dir_inode_operations = {
|
||||||
.rmdir = ext4_rmdir,
|
.rmdir = ext4_rmdir,
|
||||||
.mknod = ext4_mknod,
|
.mknod = ext4_mknod,
|
||||||
.tmpfile = ext4_tmpfile,
|
.tmpfile = ext4_tmpfile,
|
||||||
.rename2 = ext4_rename2,
|
.rename = ext4_rename2,
|
||||||
.setattr = ext4_setattr,
|
.setattr = ext4_setattr,
|
||||||
.setxattr = generic_setxattr,
|
.setxattr = generic_setxattr,
|
||||||
.getxattr = generic_getxattr,
|
.getxattr = generic_getxattr,
|
||||||
|
|
|
@ -1093,7 +1093,7 @@ const struct inode_operations f2fs_dir_inode_operations = {
|
||||||
.mkdir = f2fs_mkdir,
|
.mkdir = f2fs_mkdir,
|
||||||
.rmdir = f2fs_rmdir,
|
.rmdir = f2fs_rmdir,
|
||||||
.mknod = f2fs_mknod,
|
.mknod = f2fs_mknod,
|
||||||
.rename2 = f2fs_rename2,
|
.rename = f2fs_rename2,
|
||||||
.tmpfile = f2fs_tmpfile,
|
.tmpfile = f2fs_tmpfile,
|
||||||
.getattr = f2fs_getattr,
|
.getattr = f2fs_getattr,
|
||||||
.setattr = f2fs_setattr,
|
.setattr = f2fs_setattr,
|
||||||
|
|
|
@ -637,7 +637,7 @@ static const struct inode_operations msdos_dir_inode_operations = {
|
||||||
.unlink = msdos_unlink,
|
.unlink = msdos_unlink,
|
||||||
.mkdir = msdos_mkdir,
|
.mkdir = msdos_mkdir,
|
||||||
.rmdir = msdos_rmdir,
|
.rmdir = msdos_rmdir,
|
||||||
.rename2 = msdos_rename,
|
.rename = msdos_rename,
|
||||||
.setattr = fat_setattr,
|
.setattr = fat_setattr,
|
||||||
.getattr = fat_getattr,
|
.getattr = fat_getattr,
|
||||||
};
|
};
|
||||||
|
|
|
@ -1040,7 +1040,7 @@ static const struct inode_operations vfat_dir_inode_operations = {
|
||||||
.unlink = vfat_unlink,
|
.unlink = vfat_unlink,
|
||||||
.mkdir = vfat_mkdir,
|
.mkdir = vfat_mkdir,
|
||||||
.rmdir = vfat_rmdir,
|
.rmdir = vfat_rmdir,
|
||||||
.rename2 = vfat_rename,
|
.rename = vfat_rename,
|
||||||
.setattr = fat_setattr,
|
.setattr = fat_setattr,
|
||||||
.getattr = fat_getattr,
|
.getattr = fat_getattr,
|
||||||
};
|
};
|
||||||
|
|
|
@ -1876,7 +1876,7 @@ static const struct inode_operations fuse_dir_inode_operations = {
|
||||||
.symlink = fuse_symlink,
|
.symlink = fuse_symlink,
|
||||||
.unlink = fuse_unlink,
|
.unlink = fuse_unlink,
|
||||||
.rmdir = fuse_rmdir,
|
.rmdir = fuse_rmdir,
|
||||||
.rename2 = fuse_rename2,
|
.rename = fuse_rename2,
|
||||||
.link = fuse_link,
|
.link = fuse_link,
|
||||||
.setattr = fuse_setattr,
|
.setattr = fuse_setattr,
|
||||||
.create = fuse_create,
|
.create = fuse_create,
|
||||||
|
|
|
@ -2054,7 +2054,7 @@ const struct inode_operations gfs2_dir_iops = {
|
||||||
.mkdir = gfs2_mkdir,
|
.mkdir = gfs2_mkdir,
|
||||||
.rmdir = gfs2_unlink,
|
.rmdir = gfs2_unlink,
|
||||||
.mknod = gfs2_mknod,
|
.mknod = gfs2_mknod,
|
||||||
.rename2 = gfs2_rename2,
|
.rename = gfs2_rename2,
|
||||||
.permission = gfs2_permission,
|
.permission = gfs2_permission,
|
||||||
.setattr = gfs2_setattr,
|
.setattr = gfs2_setattr,
|
||||||
.getattr = gfs2_getattr,
|
.getattr = gfs2_getattr,
|
||||||
|
|
|
@ -324,6 +324,6 @@ const struct inode_operations hfs_dir_inode_operations = {
|
||||||
.unlink = hfs_remove,
|
.unlink = hfs_remove,
|
||||||
.mkdir = hfs_mkdir,
|
.mkdir = hfs_mkdir,
|
||||||
.rmdir = hfs_remove,
|
.rmdir = hfs_remove,
|
||||||
.rename2 = hfs_rename,
|
.rename = hfs_rename,
|
||||||
.setattr = hfs_inode_setattr,
|
.setattr = hfs_inode_setattr,
|
||||||
};
|
};
|
||||||
|
|
|
@ -565,7 +565,7 @@ const struct inode_operations hfsplus_dir_inode_operations = {
|
||||||
.rmdir = hfsplus_rmdir,
|
.rmdir = hfsplus_rmdir,
|
||||||
.symlink = hfsplus_symlink,
|
.symlink = hfsplus_symlink,
|
||||||
.mknod = hfsplus_mknod,
|
.mknod = hfsplus_mknod,
|
||||||
.rename2 = hfsplus_rename,
|
.rename = hfsplus_rename,
|
||||||
.setxattr = generic_setxattr,
|
.setxattr = generic_setxattr,
|
||||||
.getxattr = generic_getxattr,
|
.getxattr = generic_getxattr,
|
||||||
.listxattr = hfsplus_listxattr,
|
.listxattr = hfsplus_listxattr,
|
||||||
|
|
|
@ -885,7 +885,7 @@ static const struct inode_operations hostfs_dir_iops = {
|
||||||
.mkdir = hostfs_mkdir,
|
.mkdir = hostfs_mkdir,
|
||||||
.rmdir = hostfs_rmdir,
|
.rmdir = hostfs_rmdir,
|
||||||
.mknod = hostfs_mknod,
|
.mknod = hostfs_mknod,
|
||||||
.rename2 = hostfs_rename2,
|
.rename = hostfs_rename2,
|
||||||
.permission = hostfs_permission,
|
.permission = hostfs_permission,
|
||||||
.setattr = hostfs_setattr,
|
.setattr = hostfs_setattr,
|
||||||
};
|
};
|
||||||
|
|
|
@ -622,6 +622,6 @@ const struct inode_operations hpfs_dir_iops =
|
||||||
.mkdir = hpfs_mkdir,
|
.mkdir = hpfs_mkdir,
|
||||||
.rmdir = hpfs_rmdir,
|
.rmdir = hpfs_rmdir,
|
||||||
.mknod = hpfs_mknod,
|
.mknod = hpfs_mknod,
|
||||||
.rename2 = hpfs_rename,
|
.rename = hpfs_rename,
|
||||||
.setattr = hpfs_setattr,
|
.setattr = hpfs_setattr,
|
||||||
};
|
};
|
||||||
|
|
|
@ -988,7 +988,7 @@ static const struct inode_operations hugetlbfs_dir_inode_operations = {
|
||||||
.mkdir = hugetlbfs_mkdir,
|
.mkdir = hugetlbfs_mkdir,
|
||||||
.rmdir = simple_rmdir,
|
.rmdir = simple_rmdir,
|
||||||
.mknod = hugetlbfs_mknod,
|
.mknod = hugetlbfs_mknod,
|
||||||
.rename2 = simple_rename,
|
.rename = simple_rename,
|
||||||
.setattr = hugetlbfs_setattr,
|
.setattr = hugetlbfs_setattr,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,7 @@ const struct inode_operations jffs2_dir_inode_operations =
|
||||||
.mkdir = jffs2_mkdir,
|
.mkdir = jffs2_mkdir,
|
||||||
.rmdir = jffs2_rmdir,
|
.rmdir = jffs2_rmdir,
|
||||||
.mknod = jffs2_mknod,
|
.mknod = jffs2_mknod,
|
||||||
.rename2 = jffs2_rename,
|
.rename = jffs2_rename,
|
||||||
.get_acl = jffs2_get_acl,
|
.get_acl = jffs2_get_acl,
|
||||||
.set_acl = jffs2_set_acl,
|
.set_acl = jffs2_set_acl,
|
||||||
.setattr = jffs2_setattr,
|
.setattr = jffs2_setattr,
|
||||||
|
|
|
@ -1539,7 +1539,7 @@ const struct inode_operations jfs_dir_inode_operations = {
|
||||||
.mkdir = jfs_mkdir,
|
.mkdir = jfs_mkdir,
|
||||||
.rmdir = jfs_rmdir,
|
.rmdir = jfs_rmdir,
|
||||||
.mknod = jfs_mknod,
|
.mknod = jfs_mknod,
|
||||||
.rename2 = jfs_rename,
|
.rename = jfs_rename,
|
||||||
.setxattr = generic_setxattr,
|
.setxattr = generic_setxattr,
|
||||||
.getxattr = generic_getxattr,
|
.getxattr = generic_getxattr,
|
||||||
.listxattr = jfs_listxattr,
|
.listxattr = jfs_listxattr,
|
||||||
|
|
|
@ -1137,7 +1137,7 @@ const struct inode_operations kernfs_dir_iops = {
|
||||||
|
|
||||||
.mkdir = kernfs_iop_mkdir,
|
.mkdir = kernfs_iop_mkdir,
|
||||||
.rmdir = kernfs_iop_rmdir,
|
.rmdir = kernfs_iop_rmdir,
|
||||||
.rename2 = kernfs_iop_rename,
|
.rename = kernfs_iop_rename,
|
||||||
};
|
};
|
||||||
|
|
||||||
static struct kernfs_node *kernfs_leftmost_descendant(struct kernfs_node *pos)
|
static struct kernfs_node *kernfs_leftmost_descendant(struct kernfs_node *pos)
|
||||||
|
|
|
@ -787,7 +787,7 @@ const struct inode_operations logfs_dir_iops = {
|
||||||
.lookup = logfs_lookup,
|
.lookup = logfs_lookup,
|
||||||
.mkdir = logfs_mkdir,
|
.mkdir = logfs_mkdir,
|
||||||
.mknod = logfs_mknod,
|
.mknod = logfs_mknod,
|
||||||
.rename2 = logfs_rename,
|
.rename = logfs_rename,
|
||||||
.rmdir = logfs_rmdir,
|
.rmdir = logfs_rmdir,
|
||||||
.symlink = logfs_symlink,
|
.symlink = logfs_symlink,
|
||||||
.unlink = logfs_unlink,
|
.unlink = logfs_unlink,
|
||||||
|
|
|
@ -268,7 +268,7 @@ const struct inode_operations minix_dir_inode_operations = {
|
||||||
.mkdir = minix_mkdir,
|
.mkdir = minix_mkdir,
|
||||||
.rmdir = minix_rmdir,
|
.rmdir = minix_rmdir,
|
||||||
.mknod = minix_mknod,
|
.mknod = minix_mknod,
|
||||||
.rename2 = minix_rename,
|
.rename = minix_rename,
|
||||||
.getattr = minix_getattr,
|
.getattr = minix_getattr,
|
||||||
.tmpfile = minix_tmpfile,
|
.tmpfile = minix_tmpfile,
|
||||||
};
|
};
|
||||||
|
|
|
@ -4369,7 +4369,7 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
||||||
if (error)
|
if (error)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
if (!old_dir->i_op->rename2)
|
if (!old_dir->i_op->rename)
|
||||||
return -EPERM;
|
return -EPERM;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -4425,7 +4425,7 @@ int vfs_rename(struct inode *old_dir, struct dentry *old_dentry,
|
||||||
if (error)
|
if (error)
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
error = old_dir->i_op->rename2(old_dir, old_dentry,
|
error = old_dir->i_op->rename(old_dir, old_dentry,
|
||||||
new_dir, new_dentry, flags);
|
new_dir, new_dentry, flags);
|
||||||
if (error)
|
if (error)
|
||||||
goto out;
|
goto out;
|
||||||
|
|
|
@ -65,7 +65,7 @@ const struct inode_operations ncp_dir_inode_operations =
|
||||||
.mkdir = ncp_mkdir,
|
.mkdir = ncp_mkdir,
|
||||||
.rmdir = ncp_rmdir,
|
.rmdir = ncp_rmdir,
|
||||||
.mknod = ncp_mknod,
|
.mknod = ncp_mknod,
|
||||||
.rename2 = ncp_rename,
|
.rename = ncp_rename,
|
||||||
.setattr = ncp_notify_change,
|
.setattr = ncp_notify_change,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -893,7 +893,7 @@ static const struct inode_operations nfs3_dir_inode_operations = {
|
||||||
.mkdir = nfs_mkdir,
|
.mkdir = nfs_mkdir,
|
||||||
.rmdir = nfs_rmdir,
|
.rmdir = nfs_rmdir,
|
||||||
.mknod = nfs_mknod,
|
.mknod = nfs_mknod,
|
||||||
.rename2 = nfs_rename,
|
.rename = nfs_rename,
|
||||||
.permission = nfs_permission,
|
.permission = nfs_permission,
|
||||||
.getattr = nfs_getattr,
|
.getattr = nfs_getattr,
|
||||||
.setattr = nfs_setattr,
|
.setattr = nfs_setattr,
|
||||||
|
|
|
@ -8937,7 +8937,7 @@ static const struct inode_operations nfs4_dir_inode_operations = {
|
||||||
.mkdir = nfs_mkdir,
|
.mkdir = nfs_mkdir,
|
||||||
.rmdir = nfs_rmdir,
|
.rmdir = nfs_rmdir,
|
||||||
.mknod = nfs_mknod,
|
.mknod = nfs_mknod,
|
||||||
.rename2 = nfs_rename,
|
.rename = nfs_rename,
|
||||||
.permission = nfs_permission,
|
.permission = nfs_permission,
|
||||||
.getattr = nfs_getattr,
|
.getattr = nfs_getattr,
|
||||||
.setattr = nfs_setattr,
|
.setattr = nfs_setattr,
|
||||||
|
|
|
@ -685,7 +685,7 @@ static const struct inode_operations nfs_dir_inode_operations = {
|
||||||
.mkdir = nfs_mkdir,
|
.mkdir = nfs_mkdir,
|
||||||
.rmdir = nfs_rmdir,
|
.rmdir = nfs_rmdir,
|
||||||
.mknod = nfs_mknod,
|
.mknod = nfs_mknod,
|
||||||
.rename2 = nfs_rename,
|
.rename = nfs_rename,
|
||||||
.permission = nfs_permission,
|
.permission = nfs_permission,
|
||||||
.getattr = nfs_getattr,
|
.getattr = nfs_getattr,
|
||||||
.setattr = nfs_setattr,
|
.setattr = nfs_setattr,
|
||||||
|
|
|
@ -556,7 +556,7 @@ const struct inode_operations nilfs_dir_inode_operations = {
|
||||||
.mkdir = nilfs_mkdir,
|
.mkdir = nilfs_mkdir,
|
||||||
.rmdir = nilfs_rmdir,
|
.rmdir = nilfs_rmdir,
|
||||||
.mknod = nilfs_mknod,
|
.mknod = nilfs_mknod,
|
||||||
.rename2 = nilfs_rename,
|
.rename = nilfs_rename,
|
||||||
.setattr = nilfs_setattr,
|
.setattr = nilfs_setattr,
|
||||||
.permission = nilfs_permission,
|
.permission = nilfs_permission,
|
||||||
.fiemap = nilfs_fiemap,
|
.fiemap = nilfs_fiemap,
|
||||||
|
|
|
@ -2913,7 +2913,7 @@ const struct inode_operations ocfs2_dir_iops = {
|
||||||
.symlink = ocfs2_symlink,
|
.symlink = ocfs2_symlink,
|
||||||
.mkdir = ocfs2_mkdir,
|
.mkdir = ocfs2_mkdir,
|
||||||
.mknod = ocfs2_mknod,
|
.mknod = ocfs2_mknod,
|
||||||
.rename2 = ocfs2_rename,
|
.rename = ocfs2_rename,
|
||||||
.setattr = ocfs2_setattr,
|
.setattr = ocfs2_setattr,
|
||||||
.getattr = ocfs2_getattr,
|
.getattr = ocfs2_getattr,
|
||||||
.permission = ocfs2_permission,
|
.permission = ocfs2_permission,
|
||||||
|
|
|
@ -448,7 +448,7 @@ static int omfs_readdir(struct file *file, struct dir_context *ctx)
|
||||||
const struct inode_operations omfs_dir_inops = {
|
const struct inode_operations omfs_dir_inops = {
|
||||||
.lookup = omfs_lookup,
|
.lookup = omfs_lookup,
|
||||||
.mkdir = omfs_mkdir,
|
.mkdir = omfs_mkdir,
|
||||||
.rename2 = omfs_rename,
|
.rename = omfs_rename,
|
||||||
.create = omfs_create,
|
.create = omfs_create,
|
||||||
.unlink = omfs_remove,
|
.unlink = omfs_remove,
|
||||||
.rmdir = omfs_remove,
|
.rmdir = omfs_remove,
|
||||||
|
|
|
@ -463,7 +463,7 @@ const struct inode_operations orangefs_dir_inode_operations = {
|
||||||
.symlink = orangefs_symlink,
|
.symlink = orangefs_symlink,
|
||||||
.mkdir = orangefs_mkdir,
|
.mkdir = orangefs_mkdir,
|
||||||
.rmdir = orangefs_unlink,
|
.rmdir = orangefs_unlink,
|
||||||
.rename2 = orangefs_rename,
|
.rename = orangefs_rename,
|
||||||
.setattr = orangefs_setattr,
|
.setattr = orangefs_setattr,
|
||||||
.getattr = orangefs_getattr,
|
.getattr = orangefs_getattr,
|
||||||
.setxattr = generic_setxattr,
|
.setxattr = generic_setxattr,
|
||||||
|
|
|
@ -996,7 +996,7 @@ const struct inode_operations ovl_dir_inode_operations = {
|
||||||
.symlink = ovl_symlink,
|
.symlink = ovl_symlink,
|
||||||
.unlink = ovl_unlink,
|
.unlink = ovl_unlink,
|
||||||
.rmdir = ovl_rmdir,
|
.rmdir = ovl_rmdir,
|
||||||
.rename2 = ovl_rename2,
|
.rename = ovl_rename2,
|
||||||
.link = ovl_link,
|
.link = ovl_link,
|
||||||
.setattr = ovl_setattr,
|
.setattr = ovl_setattr,
|
||||||
.create = ovl_create,
|
.create = ovl_create,
|
||||||
|
|
|
@ -114,13 +114,13 @@ static inline int ovl_do_rename(struct inode *olddir, struct dentry *olddentry,
|
||||||
{
|
{
|
||||||
int err;
|
int err;
|
||||||
|
|
||||||
pr_debug("rename2(%pd2, %pd2, 0x%x)\n",
|
pr_debug("rename(%pd2, %pd2, 0x%x)\n",
|
||||||
olddentry, newdentry, flags);
|
olddentry, newdentry, flags);
|
||||||
|
|
||||||
err = vfs_rename(olddir, olddentry, newdir, newdentry, NULL, flags);
|
err = vfs_rename(olddir, olddentry, newdir, newdentry, NULL, flags);
|
||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
pr_debug("...rename2(%pd2, %pd2, ...) = %i\n",
|
pr_debug("...rename(%pd2, %pd2, ...) = %i\n",
|
||||||
olddentry, newdentry, err);
|
olddentry, newdentry, err);
|
||||||
}
|
}
|
||||||
return err;
|
return err;
|
||||||
|
|
|
@ -146,7 +146,7 @@ static const struct inode_operations ramfs_dir_inode_operations = {
|
||||||
.mkdir = ramfs_mkdir,
|
.mkdir = ramfs_mkdir,
|
||||||
.rmdir = simple_rmdir,
|
.rmdir = simple_rmdir,
|
||||||
.mknod = ramfs_mknod,
|
.mknod = ramfs_mknod,
|
||||||
.rename2 = simple_rename,
|
.rename = simple_rename,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const struct super_operations ramfs_ops = {
|
static const struct super_operations ramfs_ops = {
|
||||||
|
|
|
@ -1652,7 +1652,7 @@ const struct inode_operations reiserfs_dir_inode_operations = {
|
||||||
.mkdir = reiserfs_mkdir,
|
.mkdir = reiserfs_mkdir,
|
||||||
.rmdir = reiserfs_rmdir,
|
.rmdir = reiserfs_rmdir,
|
||||||
.mknod = reiserfs_mknod,
|
.mknod = reiserfs_mknod,
|
||||||
.rename2 = reiserfs_rename,
|
.rename = reiserfs_rename,
|
||||||
.setattr = reiserfs_setattr,
|
.setattr = reiserfs_setattr,
|
||||||
.setxattr = generic_setxattr,
|
.setxattr = generic_setxattr,
|
||||||
.getxattr = generic_getxattr,
|
.getxattr = generic_getxattr,
|
||||||
|
|
|
@ -289,6 +289,6 @@ const struct inode_operations sysv_dir_inode_operations = {
|
||||||
.mkdir = sysv_mkdir,
|
.mkdir = sysv_mkdir,
|
||||||
.rmdir = sysv_rmdir,
|
.rmdir = sysv_rmdir,
|
||||||
.mknod = sysv_mknod,
|
.mknod = sysv_mknod,
|
||||||
.rename2 = sysv_rename,
|
.rename = sysv_rename,
|
||||||
.getattr = sysv_getattr,
|
.getattr = sysv_getattr,
|
||||||
};
|
};
|
||||||
|
|
|
@ -1183,7 +1183,7 @@ const struct inode_operations ubifs_dir_inode_operations = {
|
||||||
.mkdir = ubifs_mkdir,
|
.mkdir = ubifs_mkdir,
|
||||||
.rmdir = ubifs_rmdir,
|
.rmdir = ubifs_rmdir,
|
||||||
.mknod = ubifs_mknod,
|
.mknod = ubifs_mknod,
|
||||||
.rename2 = ubifs_rename,
|
.rename = ubifs_rename,
|
||||||
.setattr = ubifs_setattr,
|
.setattr = ubifs_setattr,
|
||||||
.getattr = ubifs_getattr,
|
.getattr = ubifs_getattr,
|
||||||
.setxattr = generic_setxattr,
|
.setxattr = generic_setxattr,
|
||||||
|
|
|
@ -1357,6 +1357,6 @@ const struct inode_operations udf_dir_inode_operations = {
|
||||||
.mkdir = udf_mkdir,
|
.mkdir = udf_mkdir,
|
||||||
.rmdir = udf_rmdir,
|
.rmdir = udf_rmdir,
|
||||||
.mknod = udf_mknod,
|
.mknod = udf_mknod,
|
||||||
.rename2 = udf_rename,
|
.rename = udf_rename,
|
||||||
.tmpfile = udf_tmpfile,
|
.tmpfile = udf_tmpfile,
|
||||||
};
|
};
|
||||||
|
|
|
@ -337,5 +337,5 @@ const struct inode_operations ufs_dir_inode_operations = {
|
||||||
.mkdir = ufs_mkdir,
|
.mkdir = ufs_mkdir,
|
||||||
.rmdir = ufs_rmdir,
|
.rmdir = ufs_rmdir,
|
||||||
.mknod = ufs_mknod,
|
.mknod = ufs_mknod,
|
||||||
.rename2 = ufs_rename,
|
.rename = ufs_rename,
|
||||||
};
|
};
|
||||||
|
|
|
@ -1059,7 +1059,7 @@ static const struct inode_operations xfs_dir_inode_operations = {
|
||||||
*/
|
*/
|
||||||
.rmdir = xfs_vn_unlink,
|
.rmdir = xfs_vn_unlink,
|
||||||
.mknod = xfs_vn_mknod,
|
.mknod = xfs_vn_mknod,
|
||||||
.rename2 = xfs_vn_rename,
|
.rename = xfs_vn_rename,
|
||||||
.get_acl = xfs_get_acl,
|
.get_acl = xfs_get_acl,
|
||||||
.set_acl = xfs_set_acl,
|
.set_acl = xfs_set_acl,
|
||||||
.getattr = xfs_vn_getattr,
|
.getattr = xfs_vn_getattr,
|
||||||
|
@ -1087,7 +1087,7 @@ static const struct inode_operations xfs_dir_ci_inode_operations = {
|
||||||
*/
|
*/
|
||||||
.rmdir = xfs_vn_unlink,
|
.rmdir = xfs_vn_unlink,
|
||||||
.mknod = xfs_vn_mknod,
|
.mknod = xfs_vn_mknod,
|
||||||
.rename2 = xfs_vn_rename,
|
.rename = xfs_vn_rename,
|
||||||
.get_acl = xfs_get_acl,
|
.get_acl = xfs_get_acl,
|
||||||
.set_acl = xfs_set_acl,
|
.set_acl = xfs_set_acl,
|
||||||
.getattr = xfs_vn_getattr,
|
.getattr = xfs_vn_getattr,
|
||||||
|
|
|
@ -1732,7 +1732,7 @@ struct inode_operations {
|
||||||
int (*mkdir) (struct inode *,struct dentry *,umode_t);
|
int (*mkdir) (struct inode *,struct dentry *,umode_t);
|
||||||
int (*rmdir) (struct inode *,struct dentry *);
|
int (*rmdir) (struct inode *,struct dentry *);
|
||||||
int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t);
|
int (*mknod) (struct inode *,struct dentry *,umode_t,dev_t);
|
||||||
int (*rename2) (struct inode *, struct dentry *,
|
int (*rename) (struct inode *, struct dentry *,
|
||||||
struct inode *, struct dentry *, unsigned int);
|
struct inode *, struct dentry *, unsigned int);
|
||||||
int (*setattr) (struct dentry *, struct iattr *);
|
int (*setattr) (struct dentry *, struct iattr *);
|
||||||
int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
|
int (*getattr) (struct vfsmount *mnt, struct dentry *, struct kstat *);
|
||||||
|
|
|
@ -189,7 +189,7 @@ static const struct inode_operations bpf_dir_iops = {
|
||||||
.mknod = bpf_mkobj,
|
.mknod = bpf_mkobj,
|
||||||
.mkdir = bpf_mkdir,
|
.mkdir = bpf_mkdir,
|
||||||
.rmdir = simple_rmdir,
|
.rmdir = simple_rmdir,
|
||||||
.rename2 = simple_rename,
|
.rename = simple_rename,
|
||||||
.link = simple_link,
|
.link = simple_link,
|
||||||
.unlink = simple_unlink,
|
.unlink = simple_unlink,
|
||||||
};
|
};
|
||||||
|
|
|
@ -3814,7 +3814,7 @@ static const struct inode_operations shmem_dir_inode_operations = {
|
||||||
.mkdir = shmem_mkdir,
|
.mkdir = shmem_mkdir,
|
||||||
.rmdir = shmem_rmdir,
|
.rmdir = shmem_rmdir,
|
||||||
.mknod = shmem_mknod,
|
.mknod = shmem_mknod,
|
||||||
.rename2 = shmem_rename2,
|
.rename = shmem_rename2,
|
||||||
.tmpfile = shmem_tmpfile,
|
.tmpfile = shmem_tmpfile,
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_TMPFS_XATTR
|
#ifdef CONFIG_TMPFS_XATTR
|
||||||
|
|
|
@ -173,7 +173,7 @@ static char *tomoyo_get_local_path(struct dentry *dentry, char * const buffer,
|
||||||
* Use filesystem name if filesystem does not support rename()
|
* Use filesystem name if filesystem does not support rename()
|
||||||
* operation.
|
* operation.
|
||||||
*/
|
*/
|
||||||
if (!inode->i_op->rename2)
|
if (!inode->i_op->rename)
|
||||||
goto prepend_filesystem_name;
|
goto prepend_filesystem_name;
|
||||||
}
|
}
|
||||||
/* Prepend device name. */
|
/* Prepend device name. */
|
||||||
|
@ -283,7 +283,7 @@ char *tomoyo_realpath_from_path(const struct path *path)
|
||||||
* or dentry without vfsmount.
|
* or dentry without vfsmount.
|
||||||
*/
|
*/
|
||||||
if (!path->mnt ||
|
if (!path->mnt ||
|
||||||
(!inode->i_op->rename2))
|
(!inode->i_op->rename))
|
||||||
pos = tomoyo_get_local_path(path->dentry, buf,
|
pos = tomoyo_get_local_path(path->dentry, buf,
|
||||||
buf_len - 1);
|
buf_len - 1);
|
||||||
/* Get absolute name for the rest. */
|
/* Get absolute name for the rest. */
|
||||||
|
|
Loading…
Reference in New Issue