* [merged] mm-mlockc-change-can_do_mlock-return-value-type-to-boolean.patch removed from -mm tree
@ 2016-01-19 20:14 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2016-01-19 20:14 UTC (permalink / raw)
To: wangxq10, mm-commits
The patch titled
Subject: mm/mlock.c: change can_do_mlock return value type to boolean
has been removed from the -mm tree. Its filename was
mm-mlockc-change-can_do_mlock-return-value-type-to-boolean.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Wang Xiaoqiang <wangxq10@lzu.edu.cn>
Subject: 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>
---
include/linux/mm.h | 2 +-
mm/mlock.c | 8 ++++----
2 files changed, 5 insertions(+), 5 deletions(-)
diff -puN include/linux/mm.h~mm-mlockc-change-can_do_mlock-return-value-type-to-boolean include/linux/mm.h
--- a/include/linux/mm.h~mm-mlockc-change-can_do_mlock-return-value-type-to-boolean
+++ a/include/linux/mm.h
@@ -1100,7 +1100,7 @@ static inline bool shmem_mapping(struct
}
#endif
-extern int can_do_mlock(void);
+extern bool can_do_mlock(void);
extern int user_shm_lock(size_t, struct user_struct *);
extern void user_shm_unlock(size_t, struct user_struct *);
diff -puN mm/mlock.c~mm-mlockc-change-can_do_mlock-return-value-type-to-boolean mm/mlock.c
--- a/mm/mlock.c~mm-mlockc-change-can_do_mlock-return-value-type-to-boolean
+++ a/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);
_
Patches currently in -mm which might be from wangxq10@lzu.edu.cn are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2016-01-19 20:14 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-19 20:14 [merged] mm-mlockc-change-can_do_mlock-return-value-type-to-boolean.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.