diff options
author | Dave Chinner <david@fromorbit.com> | 2015-02-24 10:27:28 +1100 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2015-02-24 10:27:28 +1100 |
commit | 4225441a1eec45241efe529d23403d8ca3d1d71b (patch) | |
tree | 12ed2dead95f32531cccebf31d95d67280c6e361 /fs/xfs/libxfs/xfs_ialloc.c | |
parent | 3cabb836d801c3ad791c2dc6be07ec5819ab0a37 (diff) | |
parent | 964aa8d9e4d36e0e54a88683d14c7d5b9d02aed8 (diff) | |
download | lwn-4225441a1eec45241efe529d23403d8ca3d1d71b.tar.gz lwn-4225441a1eec45241efe529d23403d8ca3d1d71b.zip |
Merge branch 'xfs-generic-sb-counters' into for-next
Conflicts:
fs/xfs/xfs_super.c
Diffstat (limited to 'fs/xfs/libxfs/xfs_ialloc.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_ialloc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_ialloc.c b/fs/xfs/libxfs/xfs_ialloc.c index db0444893e96..07349a183a11 100644 --- a/fs/xfs/libxfs/xfs_ialloc.c +++ b/fs/xfs/libxfs/xfs_ialloc.c @@ -376,7 +376,8 @@ xfs_ialloc_ag_alloc( */ newlen = args.mp->m_ialloc_inos; if (args.mp->m_maxicount && - args.mp->m_sb.sb_icount + newlen > args.mp->m_maxicount) + percpu_counter_read(&args.mp->m_icount) + newlen > + args.mp->m_maxicount) return -ENOSPC; args.minlen = args.maxlen = args.mp->m_ialloc_blks; /* @@ -1340,7 +1341,8 @@ xfs_dialloc( * inode. */ if (mp->m_maxicount && - mp->m_sb.sb_icount + mp->m_ialloc_inos > mp->m_maxicount) { + percpu_counter_read(&mp->m_icount) + mp->m_ialloc_inos > + mp->m_maxicount) { noroom = 1; okalloc = 0; } |