Commit a0dbc566 authored by Miklos Szeredi's avatar Miklos Szeredi Committed by Al Viro

bad_inode: add ->rename2()

so we return -EIO instead of -EINVAL.
Signed-off-by: default avatarMiklos Szeredi <mszeredi@suse.cz>
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 7177a9c4
...@@ -218,8 +218,9 @@ static int bad_inode_mknod (struct inode *dir, struct dentry *dentry, ...@@ -218,8 +218,9 @@ static int bad_inode_mknod (struct inode *dir, struct dentry *dentry,
return -EIO; return -EIO;
} }
static int bad_inode_rename (struct inode *old_dir, struct dentry *old_dentry, static int bad_inode_rename2(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry) struct inode *new_dir, struct dentry *new_dentry,
unsigned int flags)
{ {
return -EIO; return -EIO;
} }
...@@ -279,7 +280,7 @@ static const struct inode_operations bad_inode_ops = ...@@ -279,7 +280,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,
.rename = bad_inode_rename, .rename2 = 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 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment