summaryrefslogtreecommitdiffstats
path: root/ipc/msgutil.c
diff options
context:
space:
mode:
authorStanislav Kinsbursky <skinsbursky@parallels.com>2013-01-05 00:35:01 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2013-01-05 01:11:46 +0100
commit51eeacaa07d1372a7bc9612548ffe6cd846f4f2f (patch)
treed92e69517b9973d5c2dd4697e3b38be6539bc2ca /ipc/msgutil.c
parentipc: convert prepare_copy() from macro to function (diff)
downloadlinux-51eeacaa07d1372a7bc9612548ffe6cd846f4f2f.tar.xz
linux-51eeacaa07d1372a7bc9612548ffe6cd846f4f2f.zip
ipc: simplify message copying
Remove the redundant and confusing fill_copy(). Also add copy_msg() check for error. In this case exit from the function have to be done instead of break, because further code interprets any error as EAGAIN. Also define copy_msg() for the case when CONFIG_CHECKPOINT_RESTORE is disabled. Signed-off-by: Stanislav Kinsbursky <skinsbursky@parallels.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: James Morris <jmorris@namei.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'ipc/msgutil.c')
-rw-r--r--ipc/msgutil.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/ipc/msgutil.c b/ipc/msgutil.c
index 7eecdad40efc..ebfcbfa8b7f2 100644
--- a/ipc/msgutil.c
+++ b/ipc/msgutil.c
@@ -140,6 +140,11 @@ struct msg_msg *copy_msg(struct msg_msg *src, struct msg_msg *dst)
return dst;
}
+#else
+struct msg_msg *copy_msg(struct msg_msg *src, struct msg_msg *dst)
+{
+ return ERR_PTR(-ENOSYS);
+}
#endif
int store_msg(void __user *dest, struct msg_msg *msg, int len)
{