]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerSasha Levin <alexander.levin@microsoft.com>
Wed, 17 Jan 2018 17:55:38 +0000 (12:55 -0500)
commita5579ec0173222b49e104e17aab63cd664d14024
tree85269720a5241e9b6e4604697e53c9feea3150cb
parent7103f7e1bcc4f3387c371d7ad3f102597e84da0c
mm: Handle 0 flags in _calc_vm_trans() macro

[ Upstream commit 592e254502041f953e84d091eae2c68cba04c10b ]

_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>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
include/linux/mman.h