diff options
author | Al Viro <viro@ftp.linux.org.uk> | 2007-12-05 03:32:52 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-12-05 12:25:20 -0500 |
commit | 7e46aa5c8cb1347853de9ec86f3fa440f9dc9d77 (patch) | |
tree | eb7fbee801b729e54e7826530175655fd6dce90f /fs/bfs/inode.c | |
parent | 3c50b3683a8efbf3b4b314209d86aed1a0c44d5b (diff) |
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 f433dc56344cb72cc3de5ba0819021cec3aef807 ("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>
Diffstat (limited to 'fs/bfs/inode.c')
-rw-r--r-- | fs/bfs/inode.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bfs/inode.c b/fs/bfs/inode.c index 294c41baef6e..a64a71d444f5 100644 --- a/fs/bfs/inode.c +++ b/fs/bfs/inode.c | |||
@@ -178,7 +178,8 @@ static void bfs_delete_inode(struct inode *inode) | |||
178 | brelse(bh); | 178 | brelse(bh); |
179 | 179 | ||
180 | if (bi->i_dsk_ino) { | 180 | if (bi->i_dsk_ino) { |
181 | info->si_freeb += BFS_FILEBLOCKS(bi); | 181 | if (bi->i_sblock) |
182 | info->si_freeb += bi->i_eblock + 1 - bi->i_sblock; | ||
182 | info->si_freei++; | 183 | info->si_freei++; |
183 | clear_bit(ino, info->si_imap); | 184 | clear_bit(ino, info->si_imap); |
184 | dump_imap("delete_inode", s); | 185 | dump_imap("delete_inode", s); |