Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs
[sfrench/cifs-2.6.git] / fs / xfs / xfs_aops.c
index 9c6a830da0eec4663c04b5c58606962139598890..31f1f10eecd10888924ac778f9a925785b0f82d0 100644 (file)
@@ -209,7 +209,8 @@ xfs_setfilesize_trans_alloc(
        struct xfs_trans        *tp;
        int                     error;
 
-       error = xfs_trans_alloc(mp, &M_RES(mp)->tr_fsyncts, 0, 0, 0, &tp);
+       error = xfs_trans_alloc(mp, &M_RES(mp)->tr_fsyncts, 0, 0,
+                               XFS_TRANS_NOFS, &tp);
        if (error)
                return error;
 
@@ -1330,21 +1331,20 @@ xfs_get_blocks(
        end_fsb = XFS_B_TO_FSB(mp, (xfs_ufsize_t)offset + size);
        offset_fsb = XFS_B_TO_FSBT(mp, offset);
 
-       error = xfs_bmapi_read(ip, offset_fsb, end_fsb - offset_fsb,
-                               &imap, &nimaps, XFS_BMAPI_ENTIRE);
+       error = xfs_bmapi_read(ip, offset_fsb, end_fsb - offset_fsb, &imap,
+                       &nimaps, 0);
        if (error)
                goto out_unlock;
-
-       if (nimaps) {
-               trace_xfs_get_blocks_found(ip, offset, size,
-                       imap.br_state == XFS_EXT_UNWRITTEN ?
-                               XFS_IO_UNWRITTEN : XFS_IO_OVERWRITE, &imap);
-               xfs_iunlock(ip, lockmode);
-       } else {
+       if (!nimaps) {
                trace_xfs_get_blocks_notfound(ip, offset, size);
                goto out_unlock;
        }
 
+       trace_xfs_get_blocks_found(ip, offset, size,
+               imap.br_state == XFS_EXT_UNWRITTEN ?
+                       XFS_IO_UNWRITTEN : XFS_IO_OVERWRITE, &imap);
+       xfs_iunlock(ip, lockmode);
+
        /* trim mapping down to size requested */
        xfs_map_trim_size(inode, iblock, bh_result, &imap, offset, size);
 
@@ -1390,7 +1390,7 @@ xfs_vm_bmap(
 
        /*
         * The swap code (ab-)uses ->bmap to get a block mapping and then
-        * bypasseѕ the file system for actual I/O.  We really can't allow
+        * bypasses the file system for actual I/O.  We really can't allow
         * that on reflinks inodes, so we have to skip out here.  And yes,
         * 0 is the magic code for a bmap error.
         *