aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ntfs/lcnalloc.c
diff options
context:
space:
mode:
authorAnton Altaparmakov <aia21@cantab.net>2005-03-09 10:18:43 -0500
committerAnton Altaparmakov <aia21@cantab.net>2005-05-05 06:23:20 -0400
commit43b01fda8b17b2b63e7dcdeed11c2ebba56b1fc9 (patch)
treefd925e409efa2787469689180afa78152947c4a0 /fs/ntfs/lcnalloc.c
parent2bfb4fff3e9731ecfe745881e53cfb2e646c47bb (diff)
NTFS: Fix sign of various error return values to be negative in
fs/ntfs/lcnalloc.c. Signed-off-by: Anton Altaparmakov <aia21@cantab.net>
Diffstat (limited to 'fs/ntfs/lcnalloc.c')
-rw-r--r--fs/ntfs/lcnalloc.c18
1 files changed, 9 insertions, 9 deletions
diff --git a/fs/ntfs/lcnalloc.c b/fs/ntfs/lcnalloc.c
index 6e584ab743c5..71bf08730b05 100644
--- a/fs/ntfs/lcnalloc.c
+++ b/fs/ntfs/lcnalloc.c
@@ -1,7 +1,7 @@
1/* 1/*
2 * lcnalloc.c - Cluster (de)allocation code. Part of the Linux-NTFS project. 2 * lcnalloc.c - Cluster (de)allocation code. Part of the Linux-NTFS project.
3 * 3 *
4 * Copyright (c) 2004 Anton Altaparmakov 4 * Copyright (c) 2004-2005 Anton Altaparmakov
5 * 5 *
6 * This program/include file is free software; you can redistribute it and/or 6 * This program/include file is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as published 7 * modify it under the terms of the GNU General Public License as published
@@ -60,7 +60,7 @@ int ntfs_cluster_free_from_rl_nolock(ntfs_volume *vol,
60 if (rl->lcn < 0) 60 if (rl->lcn < 0)
61 continue; 61 continue;
62 err = ntfs_bitmap_clear_run(lcnbmp_vi, rl->lcn, rl->length); 62 err = ntfs_bitmap_clear_run(lcnbmp_vi, rl->lcn, rl->length);
63 if (unlikely(err && (!ret || ret == ENOMEM) && ret != err)) 63 if (unlikely(err && (!ret || ret == -ENOMEM) && ret != err))
64 ret = err; 64 ret = err;
65 } 65 }
66 ntfs_debug("Done."); 66 ntfs_debug("Done.");
@@ -693,7 +693,7 @@ switch_to_data1_zone: search_zone = 2;
693 if (zone == MFT_ZONE || mft_zone_size <= 0) { 693 if (zone == MFT_ZONE || mft_zone_size <= 0) {
694 ntfs_debug("No free clusters left, going to out."); 694 ntfs_debug("No free clusters left, going to out.");
695 /* Really no more space left on device. */ 695 /* Really no more space left on device. */
696 err = ENOSPC; 696 err = -ENOSPC;
697 goto out; 697 goto out;
698 } /* zone == DATA_ZONE && mft_zone_size > 0 */ 698 } /* zone == DATA_ZONE && mft_zone_size > 0 */
699 ntfs_debug("Shrinking mft zone."); 699 ntfs_debug("Shrinking mft zone.");
@@ -757,9 +757,9 @@ out:
757 if (rl) { 757 if (rl) {
758 int err2; 758 int err2;
759 759
760 if (err == ENOSPC) 760 if (err == -ENOSPC)
761 ntfs_debug("Not enough space to complete allocation, " 761 ntfs_debug("Not enough space to complete allocation, "
762 "err ENOSPC, first free lcn 0x%llx, " 762 "err -ENOSPC, first free lcn 0x%llx, "
763 "could allocate up to 0x%llx " 763 "could allocate up to 0x%llx "
764 "clusters.", 764 "clusters.",
765 (unsigned long long)rl[0].lcn, 765 (unsigned long long)rl[0].lcn,
@@ -775,10 +775,10 @@ out:
775 } 775 }
776 /* Free the runlist. */ 776 /* Free the runlist. */
777 ntfs_free(rl); 777 ntfs_free(rl);
778 } else if (err == ENOSPC) 778 } else if (err == -ENOSPC)
779 ntfs_debug("No space left at all, err = ENOSPC, " 779 ntfs_debug("No space left at all, err = -ENOSPC, first free "
780 "first free lcn = 0x%llx.", 780 "lcn = 0x%llx.",
781 (unsigned long long)vol->data1_zone_pos); 781 (long long)vol->data1_zone_pos);
782 up_write(&vol->lcnbmp_lock); 782 up_write(&vol->lcnbmp_lock);
783 return ERR_PTR(err); 783 return ERR_PTR(err);
784} 784}