From 9f7b066bd901128f0a5e481e3c23ae9857b1263e Mon Sep 17 00:00:00 2001 From: LOLi Date: Mon, 5 Jun 2017 20:26:25 +0200 Subject: [PATCH] Linux 4.9 compat: fix zfs_ctldir xattr handling Since torvalds/linux@d0a5b99 IOP_XATTR is used to indicate the inode has xattr support: clear it for the ctldir inodes to avoid EIO errors. Reviewed-by: Chunwei Chen Reviewed-by: Brian Behlendorf Signed-off-by: loli10K Closes #6189 --- module/zfs/zfs_ctldir.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module/zfs/zfs_ctldir.c b/module/zfs/zfs_ctldir.c index 0c90532c10..3b5fb196f1 100644 --- a/module/zfs/zfs_ctldir.c +++ b/module/zfs/zfs_ctldir.c @@ -492,6 +492,9 @@ zfsctl_inode_alloc(zfsvfs_t *zfsvfs, uint64_t id, ip->i_ctime = now; ip->i_fop = fops; ip->i_op = ops; +#if defined(IOP_XATTR) + ip->i_opflags &= ~IOP_XATTR; +#endif if (insert_inode_locked(ip)) { unlock_new_inode(ip);