commit b80e4058e2b4234fb33a9fd84b4ce288e8ba65cb Author: Doug Ledford Date: Thu Sep 29 19:02:47 2011 -0400 ipc/mqueue: make the error returns match the conditions We should not return -EMFILE when the problem is memory usage. Signed-off-by: Doug Ledford diff --git a/ipc/mqueue.c b/ipc/mqueue.c index 0474ddb..3e53604 100644 --- a/ipc/mqueue.c +++ b/ipc/mqueue.c @@ -165,7 +165,7 @@ static struct inode *mqueue_get_inode(struct super_block *sb, u->mq_bytes + mq_bytes > task_rlimit(p, RLIMIT_MSGQUEUE)) { spin_unlock(&mq_lock); /* mqueue_evict_inode() releases info->messages */ - ret = -EMFILE; + ret = -ENOMEM; goto out_inode; } u->mq_bytes += mq_bytes;