xfs: zap broken inode forks
[linux-2.6-microblaze.git] / fs / xfs / libxfs / xfs_dir2_sf.c
index 8cd37e6..870ef1d 100644 (file)
@@ -707,11 +707,10 @@ xfs_dir2_sf_check(
 /* Verify the consistency of an inline directory. */
 xfs_failaddr_t
 xfs_dir2_sf_verify(
-       struct xfs_inode                *ip)
+       struct xfs_mount                *mp,
+       struct xfs_dir2_sf_hdr          *sfp,
+       int64_t                         size)
 {
-       struct xfs_mount                *mp = ip->i_mount;
-       struct xfs_ifork                *ifp = xfs_ifork_ptr(ip, XFS_DATA_FORK);
-       struct xfs_dir2_sf_hdr          *sfp;
        struct xfs_dir2_sf_entry        *sfep;
        struct xfs_dir2_sf_entry        *next_sfep;
        char                            *endp;
@@ -719,15 +718,9 @@ xfs_dir2_sf_verify(
        int                             i;
        int                             i8count;
        int                             offset;
-       int64_t                         size;
        int                             error;
        uint8_t                         filetype;
 
-       ASSERT(ifp->if_format == XFS_DINODE_FMT_LOCAL);
-
-       sfp = (struct xfs_dir2_sf_hdr *)ifp->if_u1.if_data;
-       size = ifp->if_bytes;
-
        /*
         * Give up if the directory is way too short.
         */