Merge tag 'xfs-for-linus-4.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs
Pull xfs fixes from Dave Chinner: "This is a little larger than I'd like late in the release cycle, but all the fixes are for regressions introduced in the 4.1-rc1 merge, or are needed back in -stable kernels fairly quickly as they are filesystem corruption or userspace visible correctness issues. Changes in this update: - regression fix for new rename whiteout code - regression fixes for new superblock generic per-cpu counter code - fix for incorrect error return sign introduced in 3.17 - metadata corruption fixes that need to go back to -stable kernels" * tag 'xfs-for-linus-4.1-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs: xfs: fix broken i_nlink accounting for whiteout tmpfile inode xfs: xfs_iozero can return positive errno xfs: xfs_attr_inactive leaves inconsistent attr fork state behind xfs: extent size hints can round up extents past MAXEXTLEN xfs: inode and free block counters need to use __percpu_counter_compare percpu_counter: batch size aware __percpu_counter_compare() xfs: use percpu_counter_read_positive for mp->m_icount
This commit is contained in:
@@ -197,13 +197,13 @@ static int percpu_counter_hotcpu_callback(struct notifier_block *nb,
|
||||
* Compare counter against given value.
|
||||
* Return 1 if greater, 0 if equal and -1 if less
|
||||
*/
|
||||
int percpu_counter_compare(struct percpu_counter *fbc, s64 rhs)
|
||||
int __percpu_counter_compare(struct percpu_counter *fbc, s64 rhs, s32 batch)
|
||||
{
|
||||
s64 count;
|
||||
|
||||
count = percpu_counter_read(fbc);
|
||||
/* Check to see if rough count will be sufficient for comparison */
|
||||
if (abs(count - rhs) > (percpu_counter_batch*num_online_cpus())) {
|
||||
if (abs(count - rhs) > (batch * num_online_cpus())) {
|
||||
if (count > rhs)
|
||||
return 1;
|
||||
else
|
||||
@@ -218,7 +218,7 @@ int percpu_counter_compare(struct percpu_counter *fbc, s64 rhs)
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL(percpu_counter_compare);
|
||||
EXPORT_SYMBOL(__percpu_counter_compare);
|
||||
|
||||
static int __init percpu_counter_startup(void)
|
||||
{
|
||||
|
Reference in New Issue
Block a user