]> granicus.if.org Git - zfs/commitdiff
Linux 4.9 compat: fix zfs_ctldir xattr handling
authorLOLi <loli10K@users.noreply.github.com>
Mon, 5 Jun 2017 18:26:25 +0000 (20:26 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Mon, 5 Jun 2017 18:26:25 +0000 (11:26 -0700)
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

module/zfs/zfs_ctldir.c

index 0c90532c1039de8a4093015f1531fa9915ef2e85..3b5fb196f1d4171f8650996f9145393b4665efa4 100644 (file)
@@ -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);