Skip to content

Commit 10930b2

Browse files
author
Darrick J. Wong
committed
xfs: fix variable state usage
The variable @Args is fed to a tracepoint, and that's the only place it's used. This is fine for the kernel, but for userspace, tracepoints are #define'd out of existence, which results in this warning on gcc 11.2: xfs_attr.c: In function ‘xfs_attr_node_try_addname’: xfs_attr.c:1440:42: warning: unused variable ‘args’ [-Wunused-variable] 1440 | struct xfs_da_args *args = attr->xattri_da_args; | ^~~~ Clean this up. Signed-off-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
1 parent f4288f0 commit 10930b2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

fs/xfs/libxfs/xfs_attr.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1441,12 +1441,11 @@ static int
14411441
xfs_attr_node_try_addname(
14421442
struct xfs_attr_intent *attr)
14431443
{
1444-
struct xfs_da_args *args = attr->xattri_da_args;
14451444
struct xfs_da_state *state = attr->xattri_da_state;
14461445
struct xfs_da_state_blk *blk;
14471446
int error;
14481447

1449-
trace_xfs_attr_node_addname(args);
1448+
trace_xfs_attr_node_addname(state->args);
14501449

14511450
blk = &state->path.blk[state->path.active-1];
14521451
ASSERT(blk->magic == XFS_ATTR_LEAF_MAGIC);

0 commit comments

Comments
 (0)