mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
ipc: convert prepare_copy() from macro to function
This code works if CONFIG_CHECKPOINT_RESTORE is disabled. [[email protected]: remove __maybe_unused] Signed-off-by: Stanislav Kinsbursky <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: James Morris <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
85398aa8de
commit
b30efe2775
1 changed files with 9 additions and 2 deletions
11
ipc/msg.c
11
ipc/msg.c
|
|
@ -803,8 +803,15 @@ static inline void free_copy(struct msg_msg *copy)
|
|||
free_msg(copy);
|
||||
}
|
||||
#else
|
||||
#define prepare_copy(buf, sz, msgflg, msgtyp, copy_nr) ERR_PTR(-ENOSYS)
|
||||
#define fill_copy(copy_nr, msg_nr, msg, copy) NULL
|
||||
|
||||
static inline struct msg_msg *prepare_copy(void __user *buf, size_t bufsz,
|
||||
int msgflg, long *msgtyp,
|
||||
unsigned long *copy_number)
|
||||
{
|
||||
return ERR_PTR(-ENOSYS);
|
||||
}
|
||||
|
||||
static inline void free_copy(struct msg_msg *copy)
|
||||
{
|
||||
}
|
||||
|
|
@ -819,7 +826,7 @@ long do_msgrcv(int msqid, void __user *buf, size_t bufsz, long msgtyp,
|
|||
int mode;
|
||||
struct ipc_namespace *ns;
|
||||
struct msg_msg *copy = NULL;
|
||||
unsigned long __maybe_unused copy_number;
|
||||
unsigned long copy_number = 0;
|
||||
|
||||
if (msqid < 0 || (long) bufsz < 0)
|
||||
return -EINVAL;
|
||||
|
|
|
|||
Loading…
Reference in a new issue