diff options
Diffstat (limited to 'fs/xfs/xfs_inode.c')
-rw-r--r-- | fs/xfs/xfs_inode.c | 12 |
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); |