Add xattr iops for special files

xfstests generic/062 was failing because it was getting an unexpected
error code when trying to work with xattrs on special files.  Adding our
ops gives it the errnos it expects.

Signed-off-by: Zach Brown <zab@versity.com>
Reviewed-by: Mark Fasheh <mfasheh@versity.com>
This commit is contained in:
Zach Brown
2016-11-22 13:41:27 -08:00
parent 78d15a019c
commit 2aa274b38b

View File

@@ -89,6 +89,13 @@ static const struct inode_operations scoutfs_file_iops = {
.removexattr = scoutfs_removexattr,
};
static const struct inode_operations scoutfs_special_iops = {
.setxattr = scoutfs_setxattr,
.getxattr = scoutfs_getxattr,
.listxattr = scoutfs_listxattr,
.removexattr = scoutfs_removexattr,
};
/*
* Called once new inode allocation or inode reading has initialized
* enough of the inode for us to set the ops based on the mode.
@@ -109,7 +116,7 @@ static void set_inode_ops(struct inode *inode)
inode->i_op = &scoutfs_symlink_iops;
break;
default:
// inode->i_op = &scoutfs_special_iops;
inode->i_op = &scoutfs_special_iops;
init_special_inode(inode, inode->i_mode, inode->i_rdev);
break;
}