]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/xfs/xfs_discard.c
Merge tag 'arm-soc/for-5.5/devicetree-part2' of https://github.com/Broadcom/stblinux...
[linux.git] / fs / xfs / xfs_discard.c
index 8ec7aab89044019c846f0082be199bf08f1bbd48..cae6136201753ec3c693308111f040f92f7fa5ce 100644 (file)
@@ -13,6 +13,7 @@
 #include "xfs_btree.h"
 #include "xfs_alloc_btree.h"
 #include "xfs_alloc.h"
+#include "xfs_discard.h"
 #include "xfs_error.h"
 #include "xfs_extent_busy.h"
 #include "xfs_trace.h"
@@ -70,7 +71,10 @@ xfs_trim_extents(
                error = xfs_alloc_get_rec(cur, &fbno, &flen, &i);
                if (error)
                        goto out_del_cursor;
-               XFS_WANT_CORRUPTED_GOTO(mp, i == 1, out_del_cursor);
+               if (XFS_IS_CORRUPT(mp, i != 1)) {
+                       error = -EFSCORRUPTED;
+                       goto out_del_cursor;
+               }
                ASSERT(flen <= be32_to_cpu(XFS_BUF_TO_AGF(agbp)->agf_longest));
 
                /*