]> git.baikalelectronics.ru Git - kernel.git/commit
mm: Handle 0 flags in _calc_vm_trans() macro
authorJan Kara <jack@suse.cz>
Fri, 3 Nov 2017 11:21:21 +0000 (12:21 +0100)
committerDan Williams <dan.j.williams@intel.com>
Fri, 3 Nov 2017 13:25:51 +0000 (06:25 -0700)
commit4509a8d29f8b40bb139975e3878ea7d2037348bc
tree536241d5f7df82fbf45bb37a464fb0e93939df2b
parentc1b31305bd9ced7f4232632fe8925af072cfcafa
mm: Handle 0 flags in _calc_vm_trans() macro

_calc_vm_trans() does not handle the situation when some of the passed
flags are 0 (which can happen if these VM flags do not make sense for
the architecture). Improve the _calc_vm_trans() macro to return 0 in
such situation. Since all passed flags are constant, this does not add
any runtime overhead.

Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
include/linux/mman.h