mirror of
https://github.com/versity/scoutfs.git
synced 2026-02-07 19:20:44 +00:00
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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user