From ed9cb8390bbcac0e43736c1bf0d6ad91dae45642 Mon Sep 17 00:00:00 2001 From: LOLi Date: Mon, 5 Jun 2017 20:26:25 +0200 Subject: 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 ebf60408d..2e1aa75fe 100644 --- a/module/zfs/zfs_ctldir.c +++ b/module/zfs/zfs_ctldir.c @@ -499,6 +499,9 @@ zfsctl_inode_alloc(zfs_sb_t *zsb, 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); -- cgit v1.2.3