mm/mlock.c: change can_do_mlock return value type to boolean
Subsystems (2)
A message that is not in the archive (sent off-list or not yet received): 20160108203823.348f2a17@debian
Andrew Morton
maintainerQuoted 15 lines · On Fri, 8 Jan 2016 20:38:23 +0800 Wang Xiaoqiang <[email protected]> wrote:
Since
can_do_mlockonly return 1 or 0, so make it boolean.No functional change.
...
mm/mlock.c +1
-1@@ -24,13 +24,13 @@#include "internal.h" -int can_do_mlock (void ) +bool can_do_mlock (void ) {
mm/mlock.c line 35
Quoted 10 lines
mm/mlock.c +3
-3if (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);
Please never send untested patches. Ever.
include/linux/mm.h renamed from include/linux/mm.h~mm-mlockc-change-can_do_mlock-return-value-type-to-boolean-fix +1 -1
@@ -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 *);
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>