diff options
author | Christoph Hellwig <hch@sgi.com> | 2005-06-21 01:36:00 -0400 |
---|---|---|
committer | Nathan Scott <nathans@sgi.com> | 2005-06-21 01:36:00 -0400 |
commit | 4372d6e10349d4e8b012588f86f15c740c73a7c4 (patch) | |
tree | 4ca00eae1d6b4eca6a4c19f1846e7cecbe3cdb09 /fs/xfs/xfs_rename.c | |
parent | cf9937c6c6c7edb6650411d1cf3cb57f072b1277 (diff) |
[XFS] Remove dead code. Patch from Adrian Bunk
SGI-PV: 936255
SGI-Modid: xfs-linux:xfs-kern:192759a
Signed-off-by: Christoph Hellwig <hch@sgi.com>
Signed-off-by: Nathan Scott <nathans@sgi.com>
Diffstat (limited to 'fs/xfs/xfs_rename.c')
-rw-r--r-- | fs/xfs/xfs_rename.c | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/fs/xfs/xfs_rename.c b/fs/xfs/xfs_rename.c index cb13f9a1d45b..23b48ac1cb7e 100644 --- a/fs/xfs/xfs_rename.c +++ b/fs/xfs/xfs_rename.c | |||
@@ -234,9 +234,6 @@ xfs_lock_for_rename( | |||
234 | return 0; | 234 | return 0; |
235 | } | 235 | } |
236 | 236 | ||
237 | |||
238 | int rename_which_error_return = 0; | ||
239 | |||
240 | /* | 237 | /* |
241 | * xfs_rename | 238 | * xfs_rename |
242 | */ | 239 | */ |
@@ -316,7 +313,6 @@ xfs_rename( | |||
316 | &num_inodes); | 313 | &num_inodes); |
317 | 314 | ||
318 | if (error) { | 315 | if (error) { |
319 | rename_which_error_return = __LINE__; | ||
320 | /* | 316 | /* |
321 | * We have nothing locked, no inode references, and | 317 | * We have nothing locked, no inode references, and |
322 | * no transaction, so just get out. | 318 | * no transaction, so just get out. |
@@ -332,7 +328,6 @@ xfs_rename( | |||
332 | */ | 328 | */ |
333 | if (target_ip == NULL && (src_dp != target_dp) && | 329 | if (target_ip == NULL && (src_dp != target_dp) && |
334 | target_dp->i_d.di_nlink >= XFS_MAXLINK) { | 330 | target_dp->i_d.di_nlink >= XFS_MAXLINK) { |
335 | rename_which_error_return = __LINE__; | ||
336 | error = XFS_ERROR(EMLINK); | 331 | error = XFS_ERROR(EMLINK); |
337 | xfs_rename_unlock4(inodes, XFS_ILOCK_SHARED); | 332 | xfs_rename_unlock4(inodes, XFS_ILOCK_SHARED); |
338 | goto rele_return; | 333 | goto rele_return; |
@@ -359,7 +354,6 @@ xfs_rename( | |||
359 | XFS_TRANS_PERM_LOG_RES, XFS_RENAME_LOG_COUNT); | 354 | XFS_TRANS_PERM_LOG_RES, XFS_RENAME_LOG_COUNT); |
360 | } | 355 | } |
361 | if (error) { | 356 | if (error) { |
362 | rename_which_error_return = __LINE__; | ||
363 | xfs_trans_cancel(tp, 0); | 357 | xfs_trans_cancel(tp, 0); |
364 | goto rele_return; | 358 | goto rele_return; |
365 | } | 359 | } |
@@ -369,7 +363,6 @@ xfs_rename( | |||
369 | */ | 363 | */ |
370 | if ((error = XFS_QM_DQVOPRENAME(mp, inodes))) { | 364 | if ((error = XFS_QM_DQVOPRENAME(mp, inodes))) { |
371 | xfs_trans_cancel(tp, cancel_flags); | 365 | xfs_trans_cancel(tp, cancel_flags); |
372 | rename_which_error_return = __LINE__; | ||
373 | goto rele_return; | 366 | goto rele_return; |
374 | } | 367 | } |
375 | 368 | ||
@@ -413,7 +406,6 @@ xfs_rename( | |||
413 | if (spaceres == 0 && | 406 | if (spaceres == 0 && |
414 | (error = XFS_DIR_CANENTER(mp, tp, target_dp, target_name, | 407 | (error = XFS_DIR_CANENTER(mp, tp, target_dp, target_name, |
415 | target_namelen))) { | 408 | target_namelen))) { |
416 | rename_which_error_return = __LINE__; | ||
417 | goto error_return; | 409 | goto error_return; |
418 | } | 410 | } |
419 | /* | 411 | /* |
@@ -425,11 +417,9 @@ xfs_rename( | |||
425 | target_namelen, src_ip->i_ino, | 417 | target_namelen, src_ip->i_ino, |
426 | &first_block, &free_list, spaceres); | 418 | &first_block, &free_list, spaceres); |
427 | if (error == ENOSPC) { | 419 | if (error == ENOSPC) { |
428 | rename_which_error_return = __LINE__; | ||
429 | goto error_return; | 420 | goto error_return; |
430 | } | 421 | } |
431 | if (error) { | 422 | if (error) { |
432 | rename_which_error_return = __LINE__; | ||
433 | goto abort_return; | 423 | goto abort_return; |
434 | } | 424 | } |
435 | xfs_ichgtime(target_dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); | 425 | xfs_ichgtime(target_dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); |
@@ -437,7 +427,6 @@ xfs_rename( | |||
437 | if (new_parent && src_is_directory) { | 427 | if (new_parent && src_is_directory) { |
438 | error = xfs_bumplink(tp, target_dp); | 428 | error = xfs_bumplink(tp, target_dp); |
439 | if (error) { | 429 | if (error) { |
440 | rename_which_error_return = __LINE__; | ||
441 | goto abort_return; | 430 | goto abort_return; |
442 | } | 431 | } |
443 | } | 432 | } |
@@ -455,7 +444,6 @@ xfs_rename( | |||
455 | if (!(XFS_DIR_ISEMPTY(target_ip->i_mount, target_ip)) || | 444 | if (!(XFS_DIR_ISEMPTY(target_ip->i_mount, target_ip)) || |
456 | (target_ip->i_d.di_nlink > 2)) { | 445 | (target_ip->i_d.di_nlink > 2)) { |
457 | error = XFS_ERROR(EEXIST); | 446 | error = XFS_ERROR(EEXIST); |
458 | rename_which_error_return = __LINE__; | ||
459 | goto error_return; | 447 | goto error_return; |
460 | } | 448 | } |
461 | } | 449 | } |
@@ -473,7 +461,6 @@ xfs_rename( | |||
473 | target_namelen, src_ip->i_ino, &first_block, | 461 | target_namelen, src_ip->i_ino, &first_block, |
474 | &free_list, spaceres); | 462 | &free_list, spaceres); |
475 | if (error) { | 463 | if (error) { |
476 | rename_which_error_return = __LINE__; | ||
477 | goto abort_return; | 464 | goto abort_return; |
478 | } | 465 | } |
479 | xfs_ichgtime(target_dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); | 466 | xfs_ichgtime(target_dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); |
@@ -484,7 +471,6 @@ xfs_rename( | |||
484 | */ | 471 | */ |
485 | error = xfs_droplink(tp, target_ip); | 472 | error = xfs_droplink(tp, target_ip); |
486 | if (error) { | 473 | if (error) { |
487 | rename_which_error_return = __LINE__; | ||
488 | goto abort_return; | 474 | goto abort_return; |
489 | } | 475 | } |
490 | target_ip_dropped = 1; | 476 | target_ip_dropped = 1; |
@@ -495,7 +481,6 @@ xfs_rename( | |||
495 | */ | 481 | */ |
496 | error = xfs_droplink(tp, target_ip); | 482 | error = xfs_droplink(tp, target_ip); |
497 | if (error) { | 483 | if (error) { |
498 | rename_which_error_return = __LINE__; | ||
499 | goto abort_return; | 484 | goto abort_return; |
500 | } | 485 | } |
501 | } | 486 | } |
@@ -519,7 +504,6 @@ xfs_rename( | |||
519 | &free_list, spaceres); | 504 | &free_list, spaceres); |
520 | ASSERT(error != EEXIST); | 505 | ASSERT(error != EEXIST); |
521 | if (error) { | 506 | if (error) { |
522 | rename_which_error_return = __LINE__; | ||
523 | goto abort_return; | 507 | goto abort_return; |
524 | } | 508 | } |
525 | xfs_ichgtime(src_ip, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); | 509 | xfs_ichgtime(src_ip, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); |
@@ -550,7 +534,6 @@ xfs_rename( | |||
550 | */ | 534 | */ |
551 | error = xfs_droplink(tp, src_dp); | 535 | error = xfs_droplink(tp, src_dp); |
552 | if (error) { | 536 | if (error) { |
553 | rename_which_error_return = __LINE__; | ||
554 | goto abort_return; | 537 | goto abort_return; |
555 | } | 538 | } |
556 | } | 539 | } |
@@ -558,7 +541,6 @@ xfs_rename( | |||
558 | error = XFS_DIR_REMOVENAME(mp, tp, src_dp, src_name, src_namelen, | 541 | error = XFS_DIR_REMOVENAME(mp, tp, src_dp, src_name, src_namelen, |
559 | src_ip->i_ino, &first_block, &free_list, spaceres); | 542 | src_ip->i_ino, &first_block, &free_list, spaceres); |
560 | if (error) { | 543 | if (error) { |
561 | rename_which_error_return = __LINE__; | ||
562 | goto abort_return; | 544 | goto abort_return; |
563 | } | 545 | } |
564 | xfs_ichgtime(src_dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); | 546 | xfs_ichgtime(src_dp, XFS_ICHGTIME_MOD | XFS_ICHGTIME_CHG); |