diff options
author | Darrick J. Wong <djwong@kernel.org> | 2023-06-30 02:39:46 +0200 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2023-07-02 18:26:19 +0200 |
commit | 75dc0345312221971903b2e28279b7e24b7dbb1b (patch) | |
tree | e316f2a6a215445c7a2e65c080d13511bf7a5856 /fs/xfs/libxfs/xfs_alloc.c | |
parent | xfs: validate fsmap offsets specified in the query keys (diff) | |
download | linux-75dc0345312221971903b2e28279b7e24b7dbb1b.tar.xz linux-75dc0345312221971903b2e28279b7e24b7dbb1b.zip |
xfs: fix xfs_btree_query_range callers to initialize btree rec fully
Use struct initializers to ensure that the xfs_btree_irecs passed into
the query_range function are completely initialized. No functional
changes, just closing some sloppy hygiene.
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_alloc.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_alloc.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c index e2da7de9b37e..200c460a3c7a 100644 --- a/fs/xfs/libxfs/xfs_alloc.c +++ b/fs/xfs/libxfs/xfs_alloc.c @@ -3823,15 +3823,11 @@ xfs_alloc_query_range( xfs_alloc_query_range_fn fn, void *priv) { - union xfs_btree_irec low_brec; - union xfs_btree_irec high_brec; - struct xfs_alloc_query_range_info query; + union xfs_btree_irec low_brec = { .a = *low_rec }; + union xfs_btree_irec high_brec = { .a = *high_rec }; + struct xfs_alloc_query_range_info query = { .priv = priv, .fn = fn }; ASSERT(cur->bc_btnum == XFS_BTNUM_BNO); - low_brec.a = *low_rec; - high_brec.a = *high_rec; - query.priv = priv; - query.fn = fn; return xfs_btree_query_range(cur, &low_brec, &high_brec, xfs_alloc_query_range_helper, &query); } |