diff options
Diffstat (limited to 'fs/xfs/xfs_bmap_util.c')
-rw-r--r-- | fs/xfs/xfs_bmap_util.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/fs/xfs/xfs_bmap_util.c b/fs/xfs/xfs_bmap_util.c index 2b954308a1d6..9e3cc2146d5b 100644 --- a/fs/xfs/xfs_bmap_util.c +++ b/fs/xfs/xfs_bmap_util.c | |||
@@ -582,9 +582,13 @@ xfs_getbmap( | |||
582 | } | 582 | } |
583 | break; | 583 | break; |
584 | default: | 584 | default: |
585 | /* Local format data forks report no extents. */ | ||
586 | if (ip->i_d.di_format == XFS_DINODE_FMT_LOCAL) { | ||
587 | bmv->bmv_entries = 0; | ||
588 | return 0; | ||
589 | } | ||
585 | if (ip->i_d.di_format != XFS_DINODE_FMT_EXTENTS && | 590 | if (ip->i_d.di_format != XFS_DINODE_FMT_EXTENTS && |
586 | ip->i_d.di_format != XFS_DINODE_FMT_BTREE && | 591 | ip->i_d.di_format != XFS_DINODE_FMT_BTREE) |
587 | ip->i_d.di_format != XFS_DINODE_FMT_LOCAL) | ||
588 | return -EINVAL; | 592 | return -EINVAL; |
589 | 593 | ||
590 | if (xfs_get_extsz_hint(ip) || | 594 | if (xfs_get_extsz_hint(ip) || |
@@ -712,7 +716,7 @@ xfs_getbmap( | |||
712 | * extents. | 716 | * extents. |
713 | */ | 717 | */ |
714 | if (map[i].br_startblock == DELAYSTARTBLOCK && | 718 | if (map[i].br_startblock == DELAYSTARTBLOCK && |
715 | map[i].br_startoff <= XFS_B_TO_FSB(mp, XFS_ISIZE(ip))) | 719 | map[i].br_startoff < XFS_B_TO_FSB(mp, XFS_ISIZE(ip))) |
716 | ASSERT((iflags & BMV_IF_DELALLOC) != 0); | 720 | ASSERT((iflags & BMV_IF_DELALLOC) != 0); |
717 | 721 | ||
718 | if (map[i].br_startblock == HOLESTARTBLOCK && | 722 | if (map[i].br_startblock == HOLESTARTBLOCK && |