diff options
Diffstat (limited to 'fs/ntfs/lcnalloc.c')
-rw-r--r-- | fs/ntfs/lcnalloc.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/fs/ntfs/lcnalloc.c b/fs/ntfs/lcnalloc.c index 29cabf93d2d2..1711b710b641 100644 --- a/fs/ntfs/lcnalloc.c +++ b/fs/ntfs/lcnalloc.c | |||
@@ -76,7 +76,7 @@ int ntfs_cluster_free_from_rl_nolock(ntfs_volume *vol, | |||
76 | * @count: number of clusters to allocate | 76 | * @count: number of clusters to allocate |
77 | * @start_lcn: starting lcn at which to allocate the clusters (or -1 if none) | 77 | * @start_lcn: starting lcn at which to allocate the clusters (or -1 if none) |
78 | * @zone: zone from which to allocate the clusters | 78 | * @zone: zone from which to allocate the clusters |
79 | * @is_extension: if TRUE, this is an attribute extension | 79 | * @is_extension: if 'true', this is an attribute extension |
80 | * | 80 | * |
81 | * Allocate @count clusters preferably starting at cluster @start_lcn or at the | 81 | * Allocate @count clusters preferably starting at cluster @start_lcn or at the |
82 | * current allocator position if @start_lcn is -1, on the mounted ntfs volume | 82 | * current allocator position if @start_lcn is -1, on the mounted ntfs volume |
@@ -87,11 +87,11 @@ int ntfs_cluster_free_from_rl_nolock(ntfs_volume *vol, | |||
87 | * @start_vcn specifies the vcn of the first allocated cluster. This makes | 87 | * @start_vcn specifies the vcn of the first allocated cluster. This makes |
88 | * merging the resulting runlist with the old runlist easier. | 88 | * merging the resulting runlist with the old runlist easier. |
89 | * | 89 | * |
90 | * If @is_extension is TRUE, the caller is allocating clusters to extend an | 90 | * If @is_extension is 'true', the caller is allocating clusters to extend an |
91 | * attribute and if it is FALSE, the caller is allocating clusters to fill a | 91 | * attribute and if it is 'false', the caller is allocating clusters to fill a |
92 | * hole in an attribute. Practically the difference is that if @is_extension | 92 | * hole in an attribute. Practically the difference is that if @is_extension |
93 | * is TRUE the returned runlist will be terminated with LCN_ENOENT and if | 93 | * is 'true' the returned runlist will be terminated with LCN_ENOENT and if |
94 | * @is_extension is FALSE the runlist will be terminated with | 94 | * @is_extension is 'false' the runlist will be terminated with |
95 | * LCN_RL_NOT_MAPPED. | 95 | * LCN_RL_NOT_MAPPED. |
96 | * | 96 | * |
97 | * You need to check the return value with IS_ERR(). If this is false, the | 97 | * You need to check the return value with IS_ERR(). If this is false, the |
@@ -146,7 +146,7 @@ int ntfs_cluster_free_from_rl_nolock(ntfs_volume *vol, | |||
146 | runlist_element *ntfs_cluster_alloc(ntfs_volume *vol, const VCN start_vcn, | 146 | runlist_element *ntfs_cluster_alloc(ntfs_volume *vol, const VCN start_vcn, |
147 | const s64 count, const LCN start_lcn, | 147 | const s64 count, const LCN start_lcn, |
148 | const NTFS_CLUSTER_ALLOCATION_ZONES zone, | 148 | const NTFS_CLUSTER_ALLOCATION_ZONES zone, |
149 | const BOOL is_extension) | 149 | const bool is_extension) |
150 | { | 150 | { |
151 | LCN zone_start, zone_end, bmp_pos, bmp_initial_pos, last_read_pos, lcn; | 151 | LCN zone_start, zone_end, bmp_pos, bmp_initial_pos, last_read_pos, lcn; |
152 | LCN prev_lcn = 0, prev_run_len = 0, mft_zone_size; | 152 | LCN prev_lcn = 0, prev_run_len = 0, mft_zone_size; |
@@ -818,7 +818,7 @@ out: | |||
818 | * Assuming you cache ctx->attr in a variable @a of type ATTR_RECORD * and that | 818 | * Assuming you cache ctx->attr in a variable @a of type ATTR_RECORD * and that |
819 | * you cache ctx->mrec in a variable @m of type MFT_RECORD *. | 819 | * you cache ctx->mrec in a variable @m of type MFT_RECORD *. |
820 | * | 820 | * |
821 | * @is_rollback should always be FALSE, it is for internal use to rollback | 821 | * @is_rollback should always be 'false', it is for internal use to rollback |
822 | * errors. You probably want to use ntfs_cluster_free() instead. | 822 | * errors. You probably want to use ntfs_cluster_free() instead. |
823 | * | 823 | * |
824 | * Note, __ntfs_cluster_free() does not modify the runlist, so you have to | 824 | * Note, __ntfs_cluster_free() does not modify the runlist, so you have to |
@@ -828,7 +828,7 @@ out: | |||
828 | * success and -errno on error. | 828 | * success and -errno on error. |
829 | * | 829 | * |
830 | * WARNING: If @ctx is supplied, regardless of whether success or failure is | 830 | * WARNING: If @ctx is supplied, regardless of whether success or failure is |
831 | * returned, you need to check IS_ERR(@ctx->mrec) and if TRUE the @ctx | 831 | * returned, you need to check IS_ERR(@ctx->mrec) and if 'true' the @ctx |
832 | * is no longer valid, i.e. you need to either call | 832 | * is no longer valid, i.e. you need to either call |
833 | * ntfs_attr_reinit_search_ctx() or ntfs_attr_put_search_ctx() on it. | 833 | * ntfs_attr_reinit_search_ctx() or ntfs_attr_put_search_ctx() on it. |
834 | * In that case PTR_ERR(@ctx->mrec) will give you the error code for | 834 | * In that case PTR_ERR(@ctx->mrec) will give you the error code for |
@@ -847,7 +847,7 @@ out: | |||
847 | * and it will be left mapped on return. | 847 | * and it will be left mapped on return. |
848 | */ | 848 | */ |
849 | s64 __ntfs_cluster_free(ntfs_inode *ni, const VCN start_vcn, s64 count, | 849 | s64 __ntfs_cluster_free(ntfs_inode *ni, const VCN start_vcn, s64 count, |
850 | ntfs_attr_search_ctx *ctx, const BOOL is_rollback) | 850 | ntfs_attr_search_ctx *ctx, const bool is_rollback) |
851 | { | 851 | { |
852 | s64 delta, to_free, total_freed, real_freed; | 852 | s64 delta, to_free, total_freed, real_freed; |
853 | ntfs_volume *vol; | 853 | ntfs_volume *vol; |
@@ -999,7 +999,7 @@ err_out: | |||
999 | * If rollback fails, set the volume errors flag, emit an error | 999 | * If rollback fails, set the volume errors flag, emit an error |
1000 | * message, and return the error code. | 1000 | * message, and return the error code. |
1001 | */ | 1001 | */ |
1002 | delta = __ntfs_cluster_free(ni, start_vcn, total_freed, ctx, TRUE); | 1002 | delta = __ntfs_cluster_free(ni, start_vcn, total_freed, ctx, true); |
1003 | if (delta < 0) { | 1003 | if (delta < 0) { |
1004 | ntfs_error(vol->sb, "Failed to rollback (error %i). Leaving " | 1004 | ntfs_error(vol->sb, "Failed to rollback (error %i). Leaving " |
1005 | "inconsistent metadata! Unmount and run " | 1005 | "inconsistent metadata! Unmount and run " |