]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - fs/xfs/xfs_rtalloc.c
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux
[karo-tx-linux.git] / fs / xfs / xfs_rtalloc.c
index ca28a4ba4b548f0c379291bfb0e716ac3a9ec54e..98dc670d3ee04182da47b27e7db1695b71807434 100644 (file)
@@ -38,6 +38,7 @@
 #include "xfs_utils.h"
 #include "xfs_trace.h"
 #include "xfs_buf.h"
+#include "xfs_icache.h"
 
 
 /*
@@ -869,7 +870,7 @@ xfs_rtbuf_get(
        ASSERT(map.br_startblock != NULLFSBLOCK);
        error = xfs_trans_read_buf(mp, tp, mp->m_ddev_targp,
                                   XFS_FSB_TO_DADDR(mp, map.br_startblock),
-                                  mp->m_bsize, 0, &bp);
+                                  mp->m_bsize, 0, &bp, NULL);
        if (error)
                return error;
        ASSERT(!xfs_buf_geterror(bp));
@@ -1872,9 +1873,14 @@ xfs_growfs_rt(
         */
        bp = xfs_buf_read_uncached(mp->m_rtdev_targp,
                                XFS_FSB_TO_BB(mp, nrblocks - 1),
-                               XFS_FSB_TO_BB(mp, 1), 0);
+                               XFS_FSB_TO_BB(mp, 1), 0, NULL);
        if (!bp)
                return EIO;
+       if (bp->b_error) {
+               error = bp->b_error;
+               xfs_buf_relse(bp);
+               return error;
+       }
        xfs_buf_relse(bp);
 
        /*
@@ -2219,9 +2225,11 @@ xfs_rtmount_init(
        }
        bp = xfs_buf_read_uncached(mp->m_rtdev_targp,
                                        d - XFS_FSB_TO_BB(mp, 1),
-                                       XFS_FSB_TO_BB(mp, 1), 0);
-       if (!bp) {
+                                       XFS_FSB_TO_BB(mp, 1), 0, NULL);
+       if (!bp || bp->b_error) {
                xfs_warn(mp, "realtime device size check failed");
+               if (bp)
+                       xfs_buf_relse(bp);
                return EIO;
        }
        xfs_buf_relse(bp);