]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[XFS] actually check error returned by xfs_flush_pages, clean up and
authorNiv Sardi <xaiki@sgi.com>
Thu, 6 Mar 2008 02:43:03 +0000 (13:43 +1100)
committerLachlan McIlroy <lachlan@redback.melbourne.sgi.com>
Fri, 18 Apr 2008 01:34:47 +0000 (11:34 +1000)
bailout if fails.

SGI-PV: 973041
SGI-Modid: xfs-linux-melb:xfs-kern:30462a

Signed-off-by: Niv Sardi <xaiki@sgi.com>
Signed-off-by: Lachlan McIlroy <lachlan@sgi.com>
fs/xfs/xfs_bmap.c

index 2def273855a2ebe3c5ae127a8ff20f2ea901aa7c..87f6467498174e2a3c0565d4db6e4612de1f23db 100644 (file)
@@ -5869,6 +5869,10 @@ xfs_getbmap(
                /* xfs_fsize_t last_byte = xfs_file_last_byte(ip); */
                error = xfs_flush_pages(ip, (xfs_off_t)0,
                                               -1, 0, FI_REMAPF);
+               if (error) {
+                       xfs_iunlock(ip, XFS_IOLOCK_SHARED);
+               return error;
+               }
        }
 
        ASSERT(whichfork == XFS_ATTR_FORK || ip->i_delayed_blks == 0);