]> git.baikalelectronics.ru Git - kernel.git/commit
f2fs: fix building on 32-bit architectures
authorArnd Bergmann <arnd@arndb.de>
Wed, 13 May 2015 20:49:58 +0000 (22:49 +0200)
committerJaegeuk Kim <jaegeuk@kernel.org>
Mon, 1 Jun 2015 23:20:53 +0000 (16:20 -0700)
commitc5945fbd4fdc2fafe7a185154fae7bd26f03afda
tree498f0eabe6a43d9ca63494eb1e708419c862a8d5
parent5727a77e4b6addcf492c069a7263e97452723544
f2fs: fix building on 32-bit architectures

A bug fix to the debug output extended the type of some local
variables to 64-bit, which now causes the kernel to fail building
because of missing 64-bit division functions:

ERROR: "__aeabi_uldivmod" [fs/f2fs/f2fs.ko] undefined!

In the kernel, we have to use div_u64 or do_div to do this,
in order to annotate that this is an expensive operation.

As the function is only called for debug out, we know this
is not performance critical, so it is safe to use div_u64.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: d1f85bd38db19 ("f2fs: avoid value overflow in showing current status")
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/debug.c