xfs: check xfs_buf_read_uncached returns correctly
[deliverable/linux.git] / fs / xfs / xfs_fsops.c
index f91de1ef05e1024b24e2f13046f828f3be497d15..c05ac8b70fa9a394232df75bffc50a7808c34e14 100644 (file)
@@ -172,16 +172,11 @@ xfs_growfs_data_private(
        if ((error = xfs_sb_validate_fsb_count(&mp->m_sb, nb)))
                return error;
        dpct = pct - mp->m_sb.sb_imax_pct;
-       bp = xfs_buf_read_uncached(mp->m_ddev_targp,
+       error = xfs_buf_read_uncached(mp->m_ddev_targp,
                                XFS_FSB_TO_BB(mp, nb) - XFS_FSS_TO_BB(mp, 1),
-                               XFS_FSS_TO_BB(mp, 1), 0, NULL);
-       if (!bp)
-               return -EIO;
-       if (bp->b_error) {
-               error = bp->b_error;
-               xfs_buf_relse(bp);
+                               XFS_FSS_TO_BB(mp, 1), 0, &bp, NULL);
+       if (error)
                return error;
-       }
        xfs_buf_relse(bp);
 
        new = nb;       /* use new as a temporary here */
This page took 0.025841 seconds and 5 git commands to generate.