aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/fs/xfs/libxfs/xfs_bmap_btree.h
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2018-03-23 10:06:52 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2018-03-23 18:05:07 -0700
commit30b0984d9117dd14c895265886d34335856b712b (patch)
treec83233ce6ee62c7675651091c584b8d40bf2d27e /fs/xfs/libxfs/xfs_bmap_btree.h
parentxfs: sanity-check the unused space before trying to use it (diff)
downloadwireguard-linux-30b0984d9117dd14c895265886d34335856b712b.tar.xz
wireguard-linux-30b0984d9117dd14c895265886d34335856b712b.zip
xfs: refactor bmap record validation
Refactor the bmap validator into a more complete helper that looks for extents that run off the end of the device, overflow into the next AG, or have invalid flag states. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_bmap_btree.h')
-rw-r--r--fs/xfs/libxfs/xfs_bmap_btree.h14
1 files changed, 0 insertions, 14 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap_btree.h b/fs/xfs/libxfs/xfs_bmap_btree.h
index 135b8c56d23e..e4505746ccaa 100644
--- a/fs/xfs/libxfs/xfs_bmap_btree.h
+++ b/fs/xfs/libxfs/xfs_bmap_btree.h
@@ -118,18 +118,4 @@ extern int xfs_bmbt_change_owner(struct xfs_trans *tp, struct xfs_inode *ip,
extern struct xfs_btree_cur *xfs_bmbt_init_cursor(struct xfs_mount *,
struct xfs_trans *, struct xfs_inode *, int);
-/*
- * Check that the extent does not contain an invalid unwritten extent flag.
- */
-static inline bool xfs_bmbt_validate_extent(struct xfs_mount *mp, int whichfork,
- struct xfs_bmbt_irec *irec)
-{
- if (irec->br_state == XFS_EXT_NORM)
- return true;
- if (whichfork == XFS_DATA_FORK &&
- xfs_sb_version_hasextflgbit(&mp->m_sb))
- return true;
- return false;
-}
-
#endif /* __XFS_BMAP_BTREE_H__ */