]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
libxfs: libxfs_nproc should never return negative numbers
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 7 Dec 2017 03:24:49 +0000 (21:24 -0600)
committerEric Sandeen <sandeen@redhat.com>
Thu, 7 Dec 2017 03:24:49 +0000 (21:24 -0600)
commit30a757b7ed5a5c71b22377b445ae0aa77fcaeca5
tree1ba61676e675224e3a673576be554bef8c05e09c
parent4eee66c596363e9f98ec7098dffd320e1bca8076
libxfs: libxfs_nproc should never return negative numbers

Prevent libxfs_nproc from returning a negative/zero CPU count if
platform_nproc happens to error out.

Fixes-coverity-id: 1425909
Fixes-coverity-id: 1425910
Fixes-coverity-id: 1425913
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/init.c