From: Niv Sardi Date: Thu, 6 Mar 2008 02:43:03 +0000 (+1100) Subject: [XFS] actually check error returned by xfs_flush_pages, clean up and X-Git-Tag: v2.6.26-rc1~1147^2~86 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=e12070a5dca8bfeee352e9655ae79772a96b32f8;p=linux-2.6-omap-h63xx.git [XFS] actually check error returned by xfs_flush_pages, clean up and bailout if fails. SGI-PV: 973041 SGI-Modid: xfs-linux-melb:xfs-kern:30462a Signed-off-by: Niv Sardi Signed-off-by: Lachlan McIlroy --- diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c index 2def273855a..87f64674981 100644 --- a/fs/xfs/xfs_bmap.c +++ b/fs/xfs/xfs_bmap.c @@ -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);