aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_ialloc.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2015-06-02 02:05:42 -0400
committerIngo Molnar <mingo@kernel.org>2015-06-02 02:05:42 -0400
commitf407a8258610169cd8e975dba7f0b2824562014c (patch)
tree6c87b2d168a4665411a9e16b9f481599f2db25bc /fs/xfs/libxfs/xfs_ialloc.c
parent960d447b94b22ceba286917056871d1dac8da697 (diff)
parentc46a024ea5eb0165114dbbc8c82c29b7bcf66e71 (diff)
Merge branch 'linus' into sched/core, to resolve conflict
Conflicts: arch/sparc/include/asm/topology_64.h Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_ialloc.c')
-rw-r--r--fs/xfs/libxfs/xfs_ialloc.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/fs/xfs/libxfs/xfs_ialloc.c b/fs/xfs/libxfs/xfs_ialloc.c
index 07349a183a11..1c9e75521250 100644
--- a/fs/xfs/libxfs/xfs_ialloc.c
+++ b/fs/xfs/libxfs/xfs_ialloc.c
@@ -376,7 +376,7 @@ xfs_ialloc_ag_alloc(
376 */ 376 */
377 newlen = args.mp->m_ialloc_inos; 377 newlen = args.mp->m_ialloc_inos;
378 if (args.mp->m_maxicount && 378 if (args.mp->m_maxicount &&
379 percpu_counter_read(&args.mp->m_icount) + newlen > 379 percpu_counter_read_positive(&args.mp->m_icount) + newlen >
380 args.mp->m_maxicount) 380 args.mp->m_maxicount)
381 return -ENOSPC; 381 return -ENOSPC;
382 args.minlen = args.maxlen = args.mp->m_ialloc_blks; 382 args.minlen = args.maxlen = args.mp->m_ialloc_blks;
@@ -1339,10 +1339,13 @@ xfs_dialloc(
1339 * If we have already hit the ceiling of inode blocks then clear 1339 * If we have already hit the ceiling of inode blocks then clear
1340 * okalloc so we scan all available agi structures for a free 1340 * okalloc so we scan all available agi structures for a free
1341 * inode. 1341 * inode.
1342 *
1343 * Read rough value of mp->m_icount by percpu_counter_read_positive,
1344 * which will sacrifice the preciseness but improve the performance.
1342 */ 1345 */
1343 if (mp->m_maxicount && 1346 if (mp->m_maxicount &&
1344 percpu_counter_read(&mp->m_icount) + mp->m_ialloc_inos > 1347 percpu_counter_read_positive(&mp->m_icount) + mp->m_ialloc_inos
1345 mp->m_maxicount) { 1348 > mp->m_maxicount) {
1346 noroom = 1; 1349 noroom = 1;
1347 okalloc = 0; 1350 okalloc = 0;
1348 } 1351 }