]> git.baikalelectronics.ru Git - kernel.git/commit
xfs: Check error during inode btree iteration in xfs_bulkstat()
authorJan Kara <jack@suse.cz>
Wed, 29 Oct 2014 23:34:52 +0000 (10:34 +1100)
committerDave Chinner <david@fromorbit.com>
Wed, 29 Oct 2014 23:34:52 +0000 (10:34 +1100)
commitbd1212368d1a49969da5112466396ef2c3b6100e
tree7cf54ac242a26dc2ff3a2a2fc6cbf81c2343a70c
parentdebbd2c13260617fbe37d0e4b8051177b8e56f40
xfs: Check error during inode btree iteration in xfs_bulkstat()

xfs_bulkstat() doesn't check error return from xfs_btree_increment(). In
case of specific fs corruption that could result in xfs_bulkstat()
entering an infinite loop because we would be looping over the same
chunk over and over again. Fix the problem by checking the return value
and terminating the loop properly.

Coverity-id: 1231338
cc: <stable@vger.kernel.org>
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Jie Liu <jeff.u.liu@gmail.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_itable.c