]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/xfs/xfs_aops.c
drivers: net: DSA: Sort drivers
[mirror_ubuntu-artful-kernel.git] / fs / xfs / xfs_aops.c
index 05eca126c688cfaa606ada5d161379f73b734fcf..09af0f7cd55e278312881999755d3d8d0793d5c8 100644 (file)
@@ -111,11 +111,11 @@ xfs_finish_page_writeback(
 
        bsize = bh->b_size;
        do {
+               if (off > end)
+                       break;
                next = bh->b_this_page;
                if (off < bvec->bv_offset)
                        goto next_bh;
-               if (off > end)
-                       break;
                bh->b_end_io(bh, !error);
 next_bh:
                off += bsize;
@@ -1261,8 +1261,8 @@ xfs_get_blocks(
 
        if (nimaps) {
                trace_xfs_get_blocks_found(ip, offset, size,
-                               ISUNWRITTEN(&imap) ? XFS_IO_UNWRITTEN
-                                                  : XFS_IO_OVERWRITE, &imap);
+                       imap.br_state == XFS_EXT_UNWRITTEN ?
+                               XFS_IO_UNWRITTEN : XFS_IO_OVERWRITE, &imap);
                xfs_iunlock(ip, lockmode);
        } else {
                trace_xfs_get_blocks_notfound(ip, offset, size);
@@ -1276,9 +1276,7 @@ xfs_get_blocks(
         * For unwritten extents do not report a disk address in the buffered
         * read case (treat as if we're reading into a hole).
         */
-       if (imap.br_startblock != HOLESTARTBLOCK &&
-           imap.br_startblock != DELAYSTARTBLOCK &&
-           !ISUNWRITTEN(&imap))
+       if (xfs_bmap_is_real_extent(&imap))
                xfs_map_buffer(inode, bh_result, &imap, offset);
 
        /*