]> 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, 31 Jul 2015 01:12:44 +0000 (11:12 +1000)
committerDave Chinner <david@fromorbit.com>
Fri, 31 Jul 2015 01:12:44 +0000 (11:12 +1000)
commitcbf3beaa6e6754815128003917e889cd848f65d2
tree88f0b5064d5a1f62f49e9d2feccfedeaade25732
parentde046644a01c965e35f9c338f51c1988324f2e03
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