]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: use percpu_counter_read_positive for mp->m_icount
authorGeorge Wang <xuw2015@gmail.com>
Fri, 3 Jul 2015 01:54:41 +0000 (11:54 +1000)
committerDave Chinner <david@fromorbit.com>
Fri, 3 Jul 2015 01:54:41 +0000 (11:54 +1000)
commitb0e6012463a50a2ca840ade4b0cfb3702d99c23c
treeb4e5022d8a3df8ad3b9aac2f7c82357447e0de20
parentd29c24323bad4513d82467ac6b5b9d5f70ec82a5
xfs: use percpu_counter_read_positive for mp->m_icount

Function percpu_counter_read just return the current counter, which can be
negative. This will cause the checking of "allocated inode
counts <= m_maxicount" false positive. Use percpu_counter_read_positive can
solve this problem, and be consistent with the purpose to introduce percpu
mechanism to xfs.

Signed-off-by: George Wang <xuw2015@gmail.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
libxfs/libxfs_priv.h
libxfs/xfs_ialloc.c