mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 11:46:19 +00:00
regression: bfs endianness bug
BFS_FILEBLOCKS() expects struct bfs_inode * (on-disk data, with little-
endian fields), not struct bfs_inode_info * (in-core stuff, with host-
endian ones).
It's a macro and fields with the right names are present in
bfs_inode_info, so it compiles, but on big-endian host it gives bogus
results.
Introduced in commit f433dc5634
("Fixes to
the BFS filesystem driver").
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
3c50b3683a
commit
7e46aa5c8c
1 changed files with 2 additions and 1 deletions
|
@ -178,7 +178,8 @@ static void bfs_delete_inode(struct inode *inode)
|
||||||
brelse(bh);
|
brelse(bh);
|
||||||
|
|
||||||
if (bi->i_dsk_ino) {
|
if (bi->i_dsk_ino) {
|
||||||
info->si_freeb += BFS_FILEBLOCKS(bi);
|
if (bi->i_sblock)
|
||||||
|
info->si_freeb += bi->i_eblock + 1 - bi->i_sblock;
|
||||||
info->si_freei++;
|
info->si_freei++;
|
||||||
clear_bit(ino, info->si_imap);
|
clear_bit(ino, info->si_imap);
|
||||||
dump_imap("delete_inode", s);
|
dump_imap("delete_inode", s);
|
||||||
|
|
Loading…
Reference in a new issue