diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2017-05-30 00:29:38 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2017-06-09 23:51:17 -0400 |
commit | 1e1fc133483ef3b56c20bf3cd9241146c41042f8 (patch) | |
tree | 6f4df10c1fcb97d3cdaf4c006e55dd08f8e3b16f /include/linux/compat.h | |
parent | 9a4690379206695b63a175e227877490beb2eeda (diff) |
compat_{get,put}_bitmap(): use unsafe_{get,put}_user()
unroll the inner loops, while we are at it
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'include/linux/compat.h')
-rw-r--r-- | include/linux/compat.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/include/linux/compat.h b/include/linux/compat.h index 1c5f3152cbb5..94ceb0348a25 100644 --- a/include/linux/compat.h +++ b/include/linux/compat.h @@ -388,8 +388,7 @@ asmlinkage long compat_sys_wait4(compat_pid_t pid, #define BITS_PER_COMPAT_LONG (8*sizeof(compat_long_t)) -#define BITS_TO_COMPAT_LONGS(bits) \ - (((bits)+BITS_PER_COMPAT_LONG-1)/BITS_PER_COMPAT_LONG) +#define BITS_TO_COMPAT_LONGS(bits) DIV_ROUND_UP(bits, BITS_PER_COMPAT_LONG) long compat_get_bitmap(unsigned long *mask, const compat_ulong_t __user *umask, unsigned long bitmap_size); |