aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_inode.c
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2014-12-03 17:43:17 -0500
committerDave Chinner <david@fromorbit.com>2014-12-03 17:43:17 -0500
commit32296f865e8d41ff8c337ce6f0b97eeda08988a3 (patch)
treee4e2bb6a1db23d836cb081c5de61c4e46c9df543 /fs/xfs/xfs_inode.c
parent9a2cc41cda189bea1fb9c41ef64d19949d3b2bcd (diff)
xfs: fix set-but-unused warnings
The kernel compile doesn't turn on these checks by default, so it's only when I do a kernel-user sync that I find that there are lots of compiler warnings waiting to be fixed. Fix up these set-but-unused warnings. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r--fs/xfs/xfs_inode.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/fs/xfs/xfs_inode.c b/fs/xfs/xfs_inode.c
index 2ffb80267e37..c0b17ec70c99 100644
--- a/fs/xfs/xfs_inode.c
+++ b/fs/xfs/xfs_inode.c
@@ -2485,9 +2485,7 @@ xfs_remove(
2485 xfs_fsblock_t first_block; 2485 xfs_fsblock_t first_block;
2486 int cancel_flags; 2486 int cancel_flags;
2487 int committed; 2487 int committed;
2488 int link_zero;
2489 uint resblks; 2488 uint resblks;
2490 uint log_count;
2491 2489
2492 trace_xfs_remove(dp, name); 2490 trace_xfs_remove(dp, name);
2493 2491
@@ -2502,13 +2500,10 @@ xfs_remove(
2502 if (error) 2500 if (error)
2503 goto std_return; 2501 goto std_return;
2504 2502
2505 if (is_dir) { 2503 if (is_dir)
2506 tp = xfs_trans_alloc(mp, XFS_TRANS_RMDIR); 2504 tp = xfs_trans_alloc(mp, XFS_TRANS_RMDIR);
2507 log_count = XFS_DEFAULT_LOG_COUNT; 2505 else
2508 } else {
2509 tp = xfs_trans_alloc(mp, XFS_TRANS_REMOVE); 2506 tp = xfs_trans_alloc(mp, XFS_TRANS_REMOVE);
2510 log_count = XFS_REMOVE_LOG_COUNT;
2511 }
2512 cancel_flags = XFS_TRANS_RELEASE_LOG_RES; 2507 cancel_flags = XFS_TRANS_RELEASE_LOG_RES;
2513 2508
2514 /* 2509 /*
@@ -2576,9 +2571,6 @@ xfs_remove(
2576 if (error) 2571 if (error)
2577 goto out_trans_cancel; 2572 goto out_trans_cancel;
2578 2573
2579 /* Determine if this is the last link while the inode is locked */
2580 link_zero = (ip->i_d.di_nlink == 0);
2581
2582 xfs_bmap_init(&free_list, &first_block); 2574 xfs_bmap_init(&free_list, &first_block);
2583 error = xfs_dir_removename(tp, dp, name, ip->i_ino, 2575 error = xfs_dir_removename(tp, dp, name, ip->i_ino,
2584 &first_block, &free_list, resblks); 2576 &first_block, &free_list, resblks);