lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20150506043807.GB10940@infradead.org>
Date:	Tue, 5 May 2015 21:38:07 -0700
From:	Christoph Hellwig <hch@...radead.org>
To:	Dave Chinner <david@...morbit.com>
Cc:	xfs@....sgi.com, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] xfs: inode counter needs to use
 __percpu_counter_compare

> diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
> index 02f827f..900f8ce 100644
> --- a/fs/xfs/xfs_mount.c
> +++ b/fs/xfs/xfs_mount.c
> @@ -1106,8 +1106,9 @@ xfs_mod_icount(
>  	int64_t			delta)
>  {
>  	/* deltas are +/-64, hence the large batch size of 128. */
> -	__percpu_counter_add(&mp->m_icount, delta, 128);
> -	if (percpu_counter_compare(&mp->m_icount, 0) < 0) {
> +#define _ICOUNT_BATCH	128
> +	__percpu_counter_add(&mp->m_icount, delta, _ICOUNT_BATCH);

Can you give XFS_ prefixes to the atch sizes and move them otuside the
function?  And fix up the instance in xfs_mod_fdblocks as well while
you're at it.

Otherwise looks fine.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ