xfs: set inode sick state flags when we zap either ondisk fork
[linux-2.6-microblaze.git] / fs / xfs / xfs_xattr.c
index 987843f..364104e 100644 (file)
@@ -136,6 +136,9 @@ xfs_xattr_get(const struct xattr_handler *handler, struct dentry *unused,
        };
        int                     error;
 
+       if (xfs_ifork_zapped(XFS_I(inode), XFS_ATTR_FORK))
+               return -EIO;
+
        error = xfs_attr_get(&args);
        if (error)
                return error;
@@ -294,6 +297,9 @@ xfs_vn_listxattr(
        struct inode    *inode = d_inode(dentry);
        int             error;
 
+       if (xfs_ifork_zapped(XFS_I(inode), XFS_ATTR_FORK))
+               return -EIO;
+
        /*
         * First read the regular on-disk attributes.
         */