summaryrefslogtreecommitdiff
path: root/fs/ufs/util.h
diff options
context:
space:
mode:
authorEvgeniy Dushistov <dushistov@mail.ru>2006-06-25 05:47:23 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-25 10:01:02 -0700
commit3e41f597b1595479e4a1b2e6b17b3542120ef165 (patch)
treea4adfd190f25b6b896ae04e9d4cbd6c4d94c872c /fs/ufs/util.h
parent9695ef16ed4e00b59303f39f9a4a422a2c6a3b89 (diff)
downloadlinux-3.10-3e41f597b1595479e4a1b2e6b17b3542120ef165.tar.gz
linux-3.10-3e41f597b1595479e4a1b2e6b17b3542120ef165.tar.bz2
linux-3.10-3e41f597b1595479e4a1b2e6b17b3542120ef165.zip
[PATCH] ufs: not usual amounts of fragments per block
The writing to UFS file system with block/fragment!=8 may cause bogus behaviour. The problem in "ufs_bitmap_search" function, which doesn't work correctly in "block/fragment!=8" case. The idea is stolen from BSD code. Signed-off-by: Evgeniy Dushistov <dushistov@mail.ru> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'fs/ufs/util.h')
-rw-r--r--fs/ufs/util.h26
1 files changed, 0 insertions, 26 deletions
diff --git a/fs/ufs/util.h b/fs/ufs/util.h
index 6a0b48cf9ce..e95d1c46461 100644
--- a/fs/ufs/util.h
+++ b/fs/ufs/util.h
@@ -513,29 +513,3 @@ static inline void ufs_fragacct (struct super_block * sb, unsigned blockmap,
if (fragsize > 0 && fragsize < uspi->s_fpb)
fs32_add(sb, &fraglist[fragsize], cnt);
}
-
-#define ubh_scanc(ubh,begin,size,table,mask) _ubh_scanc_(uspi,ubh,begin,size,table,mask)
-static inline unsigned _ubh_scanc_(struct ufs_sb_private_info * uspi, struct ufs_buffer_head * ubh,
- unsigned begin, unsigned size, unsigned char * table, unsigned char mask)
-{
- unsigned rest, offset;
- unsigned char * cp;
-
-
- offset = begin & ~uspi->s_fmask;
- begin >>= uspi->s_fshift;
- for (;;) {
- if ((offset + size) < uspi->s_fsize)
- rest = size;
- else
- rest = uspi->s_fsize - offset;
- size -= rest;
- cp = ubh->bh[begin]->b_data + offset;
- while ((table[*cp++] & mask) == 0 && --rest);
- if (rest || !size)
- break;
- begin++;
- offset = 0;
- }
- return (size + rest);
-}