aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2019-07-06 12:29:01 -0400
committerDarrick J. Wong <darrick.wong@oracle.com>2019-07-07 00:05:10 -0400
commit211bbf3c38ed90f43a3ec905e246014f96bceed7 (patch)
tree9734cf84b0a87fb9b97833c7b100cbcebdcc0f73
parent036f463fe15db26c2d90724203e4a7ea8f9b8580 (diff)
xfs: don't update lastino for FSBULKSTAT_SINGLE
The kernel test robot found a regression of xfs/054 in the conversion of bulkstat to use the new iwalk infrastructure -- if a caller set *lastip = 128 and invoked FSBULKSTAT_SINGLE, the bstat info would be for inode 128, but *lastip would be increased by the kernel to 129. FSBULKSTAT_SINGLE never incremented lastip before, so it's incorrect to make such an update to the internal lastino value now. Fixes: 2810bd6840e463 ("xfs: convert bulkstat to new iwalk infrastructure") Reported-by: kernel test robot <rong.a.chen@intel.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Allison Collins <allison.henderson@oracle.com> Reviewed-by: Brian Foster <bfoster@redhat.com>
-rw-r--r--fs/xfs/xfs_ioctl.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index 6bf04e71325b..1876461e5104 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -797,7 +797,6 @@ xfs_ioc_fsbulkstat(
797 breq.startino = lastino; 797 breq.startino = lastino;
798 breq.icount = 1; 798 breq.icount = 1;
799 error = xfs_bulkstat_one(&breq, xfs_fsbulkstat_one_fmt); 799 error = xfs_bulkstat_one(&breq, xfs_fsbulkstat_one_fmt);
800 lastino = breq.startino;
801 } else { /* XFS_IOC_FSBULKSTAT */ 800 } else { /* XFS_IOC_FSBULKSTAT */
802 breq.startino = lastino ? lastino + 1 : 0; 801 breq.startino = lastino ? lastino + 1 : 0;
803 error = xfs_bulkstat(&breq, xfs_fsbulkstat_one_fmt); 802 error = xfs_bulkstat(&breq, xfs_fsbulkstat_one_fmt);