]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/xfs/xfs_iomap.c
Merge tag 'xfs-4.12-merge-7' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
[mirror_ubuntu-artful-kernel.git] / fs / xfs / xfs_iomap.c
index 4b47403f80892f393d67ed673b8d07d63cf33fdf..a63f61c256bdc54f0a8ee6088702dbd5e91ee9aa 100644 (file)
@@ -240,7 +240,7 @@ xfs_iomap_write_direct(
         */
        if (IS_DAX(VFS_I(ip))) {
                bmapi_flags = XFS_BMAPI_CONVERT | XFS_BMAPI_ZERO;
-               if (ISUNWRITTEN(imap)) {
+               if (imap->br_state == XFS_EXT_UNWRITTEN) {
                        tflags |= XFS_TRANS_RESERVE;
                        resblks = XFS_DIOSTRAT_SPACE_RES(mp, 0) << 1;
                }
@@ -945,7 +945,7 @@ static inline bool imap_needs_alloc(struct inode *inode,
        return !nimaps ||
                imap->br_startblock == HOLESTARTBLOCK ||
                imap->br_startblock == DELAYSTARTBLOCK ||
-               (IS_DAX(inode) && ISUNWRITTEN(imap));
+               (IS_DAX(inode) && imap->br_state == XFS_EXT_UNWRITTEN);
 }
 
 static inline bool need_excl_ilock(struct xfs_inode *ip, unsigned flags)
@@ -1180,10 +1180,10 @@ xfs_xattr_iomap_begin(
        if (XFS_FORCED_SHUTDOWN(mp))
                return -EIO;
 
-       lockmode = xfs_ilock_data_map_shared(ip);
+       lockmode = xfs_ilock_attr_map_shared(ip);
 
        /* if there are no attribute fork or extents, return ENOENT */
-       if (XFS_IFORK_Q(ip) || !ip->i_d.di_anextents) {
+       if (!XFS_IFORK_Q(ip) || !ip->i_d.di_anextents) {
                error = -ENOENT;
                goto out_unlock;
        }