summaryrefslogtreecommitdiff
path: root/mm
diff options
context:
space:
mode:
authorWang Xiaoqiang <wangxq10@lzu.edu.cn>2016-01-15 16:57:22 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2016-01-15 17:56:32 -0800
commit7f43add451d2a0d235074b72d254ae266a6a023f (patch)
tree5fa15d58d7acf969f3bfc898250e0ec05eb10cd3 /mm
parent61e165578dc7ec4ee044e9ca581a315d9ca9c656 (diff)
downloadlwn-7f43add451d2a0d235074b72d254ae266a6a023f.tar.gz
lwn-7f43add451d2a0d235074b72d254ae266a6a023f.zip
mm/mlock.c: change can_do_mlock return value type to boolean
Since can_do_mlock only return 1 or 0, so make it boolean. No functional change. [akpm@linux-foundation.org: update declaration in mm.h] Signed-off-by: Wang Xiaoqiang <wangxq10@lzu.edu.cn> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/mlock.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/mm/mlock.c b/mm/mlock.c
index 9197b6721a1e..e1e2b1207bf2 100644
--- a/mm/mlock.c
+++ b/mm/mlock.c
@@ -24,13 +24,13 @@
#include "internal.h"
-int can_do_mlock(void)
+bool can_do_mlock(void)
{
if (rlimit(RLIMIT_MEMLOCK) != 0)
- return 1;
+ return true;
if (capable(CAP_IPC_LOCK))
- return 1;
- return 0;
+ return true;
+ return false;
}
EXPORT_SYMBOL(can_do_mlock);