summaryrefslogtreecommitdiffstats
path: root/fs/hfsplus/bitmap.c
diff options
context:
space:
mode:
authorJoe Perches <joe@perches.com>2013-04-30 18:27:54 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-04-30 20:04:05 -0400
commitc2b3e1f76e5c90215bc7f740b376c0220eb8a8e3 (patch)
tree4ffbb3029d06909e05621ebb96b66052640f3ff7 /fs/hfsplus/bitmap.c
parent5f3726f9457d5a863721353786e3395cdbd0f943 (diff)
hfs/hfsplus: convert dprint to hfs_dbg
Use a more current logging style. Rename macro and uses. Add do {} while (0) to macro. Add DBG_ to macro. Add and use hfs_dbg_cont variant where appropriate. Signed-off-by: Joe Perches <joe@perches.com> Cc: Vyacheslav Dubeyko <slava@dubeyko.com> Cc: Hin-Tak Leung <htl10@users.sourceforge.net> Cc: Christoph Hellwig <hch@infradead.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/hfsplus/bitmap.c')
-rw-r--r--fs/hfsplus/bitmap.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/hfsplus/bitmap.c b/fs/hfsplus/bitmap.c
index 6feefc0cb48a..7da6d46882a1 100644
--- a/fs/hfsplus/bitmap.c
+++ b/fs/hfsplus/bitmap.c
@@ -30,7 +30,7 @@ int hfsplus_block_allocate(struct super_block *sb, u32 size,
30 if (!len) 30 if (!len)
31 return size; 31 return size;
32 32
33 dprint(DBG_BITMAP, "block_allocate: %u,%u,%u\n", size, offset, len); 33 hfs_dbg(BITMAP, "block_allocate: %u,%u,%u\n", size, offset, len);
34 mutex_lock(&sbi->alloc_mutex); 34 mutex_lock(&sbi->alloc_mutex);
35 mapping = sbi->alloc_file->i_mapping; 35 mapping = sbi->alloc_file->i_mapping;
36 page = read_mapping_page(mapping, offset / PAGE_CACHE_BITS, NULL); 36 page = read_mapping_page(mapping, offset / PAGE_CACHE_BITS, NULL);
@@ -89,14 +89,14 @@ int hfsplus_block_allocate(struct super_block *sb, u32 size,
89 else 89 else
90 end = pptr + ((size + 31) & (PAGE_CACHE_BITS - 1)) / 32; 90 end = pptr + ((size + 31) & (PAGE_CACHE_BITS - 1)) / 32;
91 } 91 }
92 dprint(DBG_BITMAP, "bitmap full\n"); 92 hfs_dbg(BITMAP, "bitmap full\n");
93 start = size; 93 start = size;
94 goto out; 94 goto out;
95 95
96found: 96found:
97 start = offset + (curr - pptr) * 32 + i; 97 start = offset + (curr - pptr) * 32 + i;
98 if (start >= size) { 98 if (start >= size) {
99 dprint(DBG_BITMAP, "bitmap full\n"); 99 hfs_dbg(BITMAP, "bitmap full\n");
100 goto out; 100 goto out;
101 } 101 }
102 /* do any partial u32 at the start */ 102 /* do any partial u32 at the start */
@@ -154,7 +154,7 @@ done:
154 *max = offset + (curr - pptr) * 32 + i - start; 154 *max = offset + (curr - pptr) * 32 + i - start;
155 sbi->free_blocks -= *max; 155 sbi->free_blocks -= *max;
156 hfsplus_mark_mdb_dirty(sb); 156 hfsplus_mark_mdb_dirty(sb);
157 dprint(DBG_BITMAP, "-> %u,%u\n", start, *max); 157 hfs_dbg(BITMAP, "-> %u,%u\n", start, *max);
158out: 158out:
159 mutex_unlock(&sbi->alloc_mutex); 159 mutex_unlock(&sbi->alloc_mutex);
160 return start; 160 return start;
@@ -173,7 +173,7 @@ int hfsplus_block_free(struct super_block *sb, u32 offset, u32 count)
173 if (!count) 173 if (!count)
174 return 0; 174 return 0;
175 175
176 dprint(DBG_BITMAP, "block_free: %u,%u\n", offset, count); 176 hfs_dbg(BITMAP, "block_free: %u,%u\n", offset, count);
177 /* are all of the bits in range? */ 177 /* are all of the bits in range? */
178 if ((offset + count) > sbi->total_blocks) 178 if ((offset + count) > sbi->total_blocks)
179 return -ENOENT; 179 return -ENOENT;