Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 167175
b: refs/heads/master
c: 8e69ce1
h: refs/heads/master
i:
  167173: 67aabb2
  167171: 5b47f5e
  167167: f56ef75
v: v3
  • Loading branch information
Eric Sandeen authored and Alex Elder committed Oct 8, 2009
1 parent 05014d2 commit 5cc9128
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dce5065a57c158e0ca5db8e63c50118b2ecf4ac5
refs/heads/master: 8e69ce147127a0235e8d1f2b75ea214be78c61b3
4 changes: 3 additions & 1 deletion trunk/fs/xfs/xfs_dir2_leaf.c
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,7 @@ xfs_dir2_leaf_getdents(
*/
ra_want = howmany(bufsize + mp->m_dirblksize,
mp->m_sb.sb_blocksize) - 1;
ASSERT(ra_want >= 0);

/*
* If we don't have as many as we want, and we haven't
Expand Down Expand Up @@ -1088,7 +1089,8 @@ xfs_dir2_leaf_getdents(
*/
ptr += length;
curoff += length;
bufsize -= length;
/* bufsize may have just been a guess; don't go negative */
bufsize = bufsize > length ? bufsize - length : 0;
}

/*
Expand Down

0 comments on commit 5cc9128

Please sign in to comment.