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 <david.chen@osnexus.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
Closes #6189
This commit is contained in:
LOLi 2017-06-05 20:26:25 +02:00 committed by Brian Behlendorf
parent 099700d9df
commit 9f7b066bd9

View File

@ -492,6 +492,9 @@ zfsctl_inode_alloc(zfsvfs_t *zfsvfs, uint64_t id,
ip->i_ctime = now; ip->i_ctime = now;
ip->i_fop = fops; ip->i_fop = fops;
ip->i_op = ops; ip->i_op = ops;
#if defined(IOP_XATTR)
ip->i_opflags &= ~IOP_XATTR;
#endif
if (insert_inode_locked(ip)) { if (insert_inode_locked(ip)) {
unlock_new_inode(ip); unlock_new_inode(ip);