summaryrefslogtreecommitdiff
path: root/fs/xfs
diff options
context:
space:
mode:
authorYingping Lu <yingping@sgi.com>2005-11-02 07:09:54 +0300
committerNathan Scott <nathans@sgi.com>2005-11-02 07:09:54 +0300
commit9af0a70c07a0e7575ebbdb42ca9fb29ffaaf77c9 (patch)
tree12c2d1126a69cc6ba23e03db957bfa866266fcfd /fs/xfs
parent7f14d0a013eeae8f8548e9ac10699465de2adacc (diff)
downloadlinux-9af0a70c07a0e7575ebbdb42ca9fb29ffaaf77c9.tar.xz
[XFS] Fixed a bug in reporting extent list for attribute fork running
xfs_bmap -a. SGI-PV: 944075 SGI-Modid: xfs-linux:xfs-kern:200860a Signed-off-by: Yingping Lu <yingping@sgi.com> Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_bmap.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/fs/xfs/xfs_bmap.c b/fs/xfs/xfs_bmap.c
index fbd48f9b797e..e52387b3abef 100644
--- a/fs/xfs/xfs_bmap.c
+++ b/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 =