diff options
author | Eric Sandeen <sandeen@redhat.com> | 2014-04-14 13:06:46 +0400 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2014-04-14 13:06:46 +0400 |
commit | e5e98bc64df122c3c0fb562c53dac5c5dfc64975 (patch) | |
tree | c9b2bc7b5314dc1460167e8c796d00fd41c1a34d /fs/xfs/xfs_dir2_block.c | |
parent | bbe4c668694cb22a6016d3845c9b362c44e8341f (diff) | |
download | linux-e5e98bc64df122c3c0fb562c53dac5c5dfc64975.tar.xz |
xfs: remove pointless pointer increment in xfs_dir2_block_compact()
xfs_dir2_block_compact() is passed a pointer to *blp, and
advances it locally - but nobody uses the pointer (locally)
after that.
This behavior came about as part of prior refactoring,
20f7e9f xfs: factor dir2 block read operations
and looking at the code as it was before, it seems quite clear
that this change introduced a bug; the pre-refactoring code
expects blp to be modified after compaction.
And indeed it did; see this commit which fixed it:
37f1356 xfs: recalculate leaf entry pointer after compacting a dir2 block
So the bug was introduced & resolved in the 3.8 cycle.
Whoops. Well, it's fixed now, and mystery solved; just remove
the now-pointless local increment of the blp pointer.
(I guess we should have run clang earlier!)
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_dir2_block.c')
-rw-r--r-- | fs/xfs/xfs_dir2_block.c | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/xfs/xfs_dir2_block.c b/fs/xfs/xfs_dir2_block.c index d7acf7017c26..dd9d00515582 100644 --- a/fs/xfs/xfs_dir2_block.c +++ b/fs/xfs/xfs_dir2_block.c @@ -319,7 +319,6 @@ xfs_dir2_block_compact( (xfs_dir2_data_aoff_t)((char *)blp - (char *)hdr), (xfs_dir2_data_aoff_t)((be32_to_cpu(btp->stale) - 1) * sizeof(*blp)), needlog, &needscan); - blp += be32_to_cpu(btp->stale) - 1; btp->stale = cpu_to_be32(1); /* * If we now need to rebuild the bestfree map, do so. |