Skip to content

Commit

Permalink
bad_inode: add ->rename2()
Browse files Browse the repository at this point in the history
so we return -EIO instead of -EINVAL.

Signed-off-by: Miklos Szeredi <[email protected]>
Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Al Viro <[email protected]>
  • Loading branch information
Miklos Szeredi authored and Al Viro committed Aug 7, 2014
1 parent 7177a9c commit a0dbc56
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions fs/bad_inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -218,8 +218,9 @@ static int bad_inode_mknod (struct inode *dir, struct dentry *dentry,
return -EIO;
}

static int bad_inode_rename (struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry)
static int bad_inode_rename2(struct inode *old_dir, struct dentry *old_dentry,
struct inode *new_dir, struct dentry *new_dentry,
unsigned int flags)
{
return -EIO;
}
Expand Down Expand Up @@ -279,7 +280,7 @@ static const struct inode_operations bad_inode_ops =
.mkdir = bad_inode_mkdir,
.rmdir = bad_inode_rmdir,
.mknod = bad_inode_mknod,
.rename = bad_inode_rename,
.rename2 = bad_inode_rename2,
.readlink = bad_inode_readlink,
/* follow_link must be no-op, otherwise unmounting this inode
won't work */
Expand Down

0 comments on commit a0dbc56

Please sign in to comment.