X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=fs%2Fext3%2Fbitmap.c;h=6afc39d80253cf4560ce69b9a4b1983d1df3871b;hb=683c5e853ebe2d1ac72128f1828421de7fc3a23c;hp=5b4ba3e246e60ebc72e7c538bf61453d29494a53;hpb=7079060f3e86ea4c1d4e9c1e356592ef9dcaaa1f;p=mirror_ubuntu-bionic-kernel.git diff --git a/fs/ext3/bitmap.c b/fs/ext3/bitmap.c index 5b4ba3e246e6..6afc39d80253 100644 --- a/fs/ext3/bitmap.c +++ b/fs/ext3/bitmap.c @@ -8,19 +8,25 @@ */ #include -#include "bitmap.h" +#include +#include -static int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0}; +#ifdef EXT3FS_DEBUG + +static const int nibblemap[] = {4, 3, 3, 2, 3, 2, 2, 1, 3, 2, 2, 1, 2, 1, 1, 0}; unsigned long ext3_count_free (struct buffer_head * map, unsigned int numchars) { unsigned int i; unsigned long sum = 0; - if (!map) + if (!map) return (0); for (i = 0; i < numchars; i++) sum += nibblemap[map->b_data[i] & 0xf] + nibblemap[(map->b_data[i] >> 4) & 0xf]; return (sum); } + +#endif /* EXT3FS_DEBUG */ +