Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 209981
b: refs/heads/master
c: 2fe3366
h: refs/heads/master
i:
  209979: 54ea7f9
v: v3
  • Loading branch information
Stuart Brodsky authored and Dave Chinner committed Aug 24, 2010
1 parent 29e6db3 commit 453024c
Show file tree
Hide file tree
Showing 2 changed files with 7 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: efceab1d563153a2b1a6e7d35376241a48126989
refs/heads/master: 2fe33661fcd79d4c53022509f7223d526b5fa233
7 changes: 6 additions & 1 deletion trunk/fs/xfs/linux-2.6/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1226,6 +1226,7 @@ xfs_fs_statfs(
struct xfs_inode *ip = XFS_I(dentry->d_inode);
__uint64_t fakeinos, id;
xfs_extlen_t lsize;
__int64_t ffree;

statp->f_type = XFS_SB_MAGIC;
statp->f_namelen = MAXNAMELEN - 1;
Expand All @@ -1249,7 +1250,11 @@ xfs_fs_statfs(
statp->f_files = min_t(typeof(statp->f_files),
statp->f_files,
mp->m_maxicount);
statp->f_ffree = statp->f_files - (sbp->sb_icount - sbp->sb_ifree);

/* make sure statp->f_ffree does not underflow */
ffree = statp->f_files - (sbp->sb_icount - sbp->sb_ifree);
statp->f_ffree = max_t(__int64_t, ffree, 0);

spin_unlock(&mp->m_sb_lock);

if ((ip->i_d.di_flags & XFS_DIFLAG_PROJINHERIT) ||
Expand Down

0 comments on commit 453024c

Please sign in to comment.