[PATCH v2 05/10] xfs: fix error handling in xfs_bulkstat
Christoph Hellwig
hch at infradead.org
Fri Apr 25 01:48:15 CDT 2014
> Moreover, this fix also get rid of the redundant user buffer count
> pre-checkups as it has already been validated in upper callers.
> - if (!ubcountp || *ubcountp <= 0) {
> - return EINVAL;
> - }
Probably better to have this as a separate patch.
> - /*
> - * Loop as long as we're unable to read the
> - * inode btree.
> - */
> - while (error) {
> - agino += XFS_INODES_PER_CHUNK;
> - if (XFS_AGINO_TO_AGBNO(mp, agino) >=
> - be32_to_cpu(agi->agi_length))
> - break;
> - error = xfs_inobt_lookup(cur, agino,
> - XFS_LOOKUP_GE, &tmp);
> - cond_resched();
> - }
This code goes back to 1995, but I still can't see how it would make
sense. I think we should get rid of this, but I'd also love to have
Dave and Eric double check it as well.
Signed-off-by: Christoph Hellwig <hch at lst.de>
More information about the xfs
mailing list