From 55d655a8d4226c679195f4712e22dcba9a181da8 Mon Sep 17 00:00:00 2001 From: Yingping Lu Date: Wed, 2 Nov 2005 15:09:54 +1100 Subject: [PATCH] --- yaml --- r: 12216 b: refs/heads/master c: 9af0a70c07a0e7575ebbdb42ca9fb29ffaaf77c9 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/xfs/xfs_bmap.c | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/[refs] b/[refs] index 02c64558bbc7..20c942058b94 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7f14d0a013eeae8f8548e9ac10699465de2adacc +refs/heads/master: 9af0a70c07a0e7575ebbdb42ca9fb29ffaaf77c9 diff --git a/trunk/fs/xfs/xfs_bmap.c b/trunk/fs/xfs/xfs_bmap.c index fbd48f9b797e..e52387b3abef 100644 --- a/trunk/fs/xfs/xfs_bmap.c +++ b/trunk/fs/xfs/xfs_bmap.c @@ -5725,12 +5725,13 @@ xfs_getbmap( out.bmv_offset = XFS_FSB_TO_BB(mp, map[i].br_startoff); out.bmv_length = XFS_FSB_TO_BB(mp, map[i].br_blockcount); ASSERT(map[i].br_startblock != DELAYSTARTBLOCK); - if (prealloced && - map[i].br_startblock == HOLESTARTBLOCK && - out.bmv_offset + out.bmv_length == bmvend) { - /* - * came to hole at end of file - */ + if (map[i].br_startblock == HOLESTARTBLOCK && + ((prealloced && out.bmv_offset + out.bmv_length == bmvend) || + whichfork == XFS_ATTR_FORK )) { + /* + * came to hole at end of file or the end of + attribute fork + */ goto unlock_and_return; } else { out.bmv_block =