Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 23108
b: refs/heads/master
c: 4eea22f
h: refs/heads/master
v: v3
  • Loading branch information
Mandy Kirkconnell authored and Nathan Scott committed Mar 14, 2006
1 parent ce817a0 commit 0c42d79
Show file tree
Hide file tree
Showing 7 changed files with 598 additions and 411 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: 9f989c9455aac417c34af9c505e6b169055251da
refs/heads/master: 4eea22f01bb4fdba1aab4430c33adbe88d9d4985
9 changes: 5 additions & 4 deletions trunk/fs/xfs/quota/xfs_qm.c
Original file line number Diff line number Diff line change
Expand Up @@ -1704,9 +1704,9 @@ xfs_qm_get_rtblks(
xfs_qcnt_t *O_rtblks)
{
xfs_filblks_t rtblks; /* total rt blks */
xfs_extnum_t idx; /* extent record index */
xfs_ifork_t *ifp; /* inode fork pointer */
xfs_extnum_t nextents; /* number of extent entries */
xfs_bmbt_rec_t *base; /* base of extent array */
xfs_bmbt_rec_t *ep; /* pointer to an extent entry */
int error;

Expand All @@ -1717,10 +1717,11 @@ xfs_qm_get_rtblks(
return error;
}
rtblks = 0;
nextents = ifp->if_bytes / sizeof(xfs_bmbt_rec_t);
base = &ifp->if_u1.if_extents[0];
for (ep = base; ep < &base[nextents]; ep++)
nextents = ifp->if_bytes / (uint)sizeof(xfs_bmbt_rec_t);
for (idx = 0; idx < nextents; idx++) {
ep = xfs_iext_get_ext(ifp, idx);
rtblks += xfs_bmbt_get_blockcount(ep);
}
*O_rtblks = (xfs_qcnt_t)rtblks;
return 0;
}
Expand Down
Loading

0 comments on commit 0c42d79

Please sign in to comment.