xfs: merge xfs_ag.h into xfs_format.h
[firefly-linux-kernel-4.4.55.git] / fs / xfs / libxfs / xfs_da_btree.c
index 2c42ae28d027594aa456e15572094c24f9aac035..2b880617135cdbe3b65a778c83310d30e984115e 100644 (file)
@@ -24,7 +24,6 @@
 #include "xfs_trans_resv.h"
 #include "xfs_bit.h"
 #include "xfs_sb.h"
-#include "xfs_ag.h"
 #include "xfs_mount.h"
 #include "xfs_da_format.h"
 #include "xfs_da_btree.h"
@@ -2563,7 +2562,8 @@ xfs_da_get_buf(
                                    mapp, nmap, 0);
        error = bp ? bp->b_error : -EIO;
        if (error) {
-               xfs_trans_brelse(trans, bp);
+               if (bp)
+                       xfs_trans_brelse(trans, bp);
                goto out_free;
        }