alistair23-linux/fs/hfsplus
Geert Uytterhoeven a99b7069aa hfsplus: Fix undefined __divdi3 in hfsplus_init_header_node()
ERROR: "__divdi3" [fs/hfsplus/hfsplus.ko] undefined!

Introduced by commit 099e9245e0 ("hfsplus: implement attributes file's
header node initialization code").

i_size_read() returns loff_t, which is long long, i.e.  64-bit.  node_size
is size_t, which is either 32-bit or 64-bit.  Hence
"i_size_read(attr_file) / node_size" is a 64-by-32 or 64-by-64 division,
causing (some versions of) gcc to emit a call to __divdi3().

Fortunately node_size is actually 16-bit, as the sole caller of
hfsplus_init_header_node() passes a u16.  Hence change its type from
size_t to u16, and use do_div() to perform a 64-by-32 division.

Not seen in m68k/allmodconfig in -next, so it really depends on the
verion of gcc.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Vyacheslav Dubeyko <slava@dubeyko.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2013-11-15 09:32:23 +09:00
..
acl.h
attributes.c
bfind.c
bitmap.c
bnode.c
brec.c
btree.c hfsplus: add metadata file's clump size calculation functionality 2013-11-13 12:09:32 +09:00
catalog.c
dir.c hfsplus: integrate POSIX ACLs support into driver 2013-09-11 15:59:01 -07:00
extents.c
hfsplus_fs.h hfsplus: implement attributes file creation functionality 2013-11-13 12:09:32 +09:00
hfsplus_raw.h hfsplus: implement attributes file's header node initialization code 2013-11-13 12:09:32 +09:00
inode.c truncate: drop 'oldsize' truncate_pagecache() parameter 2013-09-12 15:38:02 -07:00
ioctl.c
Kconfig
Makefile hfsplus: integrate POSIX ACLs support into driver 2013-09-11 15:59:01 -07:00
options.c
part_tbl.c
posix_acl.c
super.c hfsplus: implement attributes file creation functionality 2013-11-13 12:09:32 +09:00
tables.c
unicode.c
wrapper.c
xattr.c hfsplus: Fix undefined __divdi3 in hfsplus_init_header_node() 2013-11-15 09:32:23 +09:00
xattr.h hfsplus: integrate POSIX ACLs support into driver 2013-09-11 15:59:01 -07:00
xattr_security.c hfsplus: integrate POSIX ACLs support into driver 2013-09-11 15:59:01 -07:00
xattr_trusted.c
xattr_user.c