Delta-compile-fix01.diff

From Linix VServer
Jump to navigationJump to search

diff -Nurp linux-2.6.24-rc6-vs2.2.0.5.0.2-pre/drivers/block/vroot.c linux-2.6.24-rc6-vs2.2.0.5.0.2-pre.1/drivers/block/vroot.c --- linux-2.6.24-rc6-vs2.2.0.5.0.2-pre/drivers/block/vroot.c 2007-12-24 21:57:17.000000000 +0100 +++ linux-2.6.24-rc6-vs2.2.0.5.0.2-pre.1/drivers/block/vroot.c 2007-12-26 15:41:42.000000000 +0100 @@ -257,8 +257,7 @@ void vroot_exit(void) del_gendisk(disks[i]); put_disk(disks[i]); } - if (unregister_blkdev(VROOT_MAJOR, "vroot")) - printk(KERN_WARNING "vroot: cannot unregister blkdev\n"); + unregister_blkdev(VROOT_MAJOR, "vroot"); kfree(disks); kfree(vroot_dev); diff -Nurp linux-2.6.24-rc6-vs2.2.0.5.0.2-pre/fs/proc/base.c linux-2.6.24-rc6-vs2.2.0.5.0.2-pre.1/fs/proc/base.c --- linux-2.6.24-rc6-vs2.2.0.5.0.2-pre/fs/proc/base.c 2007-12-24 22:00:57.000000000 +0100 +++ linux-2.6.24-rc6-vs2.2.0.5.0.2-pre.1/fs/proc/base.c 2007-12-26 15:41:28.000000000 +0100 @@ -2501,7 +2501,7 @@ int proc_pid_readdir(struct file * filp, iter.task; iter.tgid += 1, iter = next_tgid(ns, iter)) { filp->f_pos = iter.tgid + TGID_OFFSET; - if (!vx_proc_task_visible(task)) + if (!vx_proc_task_visible(iter.task)) continue; if (proc_pid_fill_cache(filp, dirent, filldir, iter) < 0) { put_task_struct(iter.task); diff -Nurp linux-2.6.24-rc6-vs2.2.0.5.0.2-pre/ipc/mqueue.c linux-2.6.24-rc6-vs2.2.0.5.0.2-pre.1/ipc/mqueue.c --- linux-2.6.24-rc6-vs2.2.0.5.0.2-pre/ipc/mqueue.c 2007-12-24 21:57:20.000000000 +0100 +++ linux-2.6.24-rc6-vs2.2.0.5.0.2-pre.1/ipc/mqueue.c 2007-12-26 15:40:47.000000000 +0100 @@ -73,6 +73,7 @@ struct mqueue_inode_info { struct sigevent notify; struct pid* notify_owner; struct user_struct *user; /* user who created, for accounting */ + struct vx_info *vxi; struct sock *notify_sock; struct sk_buff *notify_cookie; @@ -121,6 +122,7 @@ static struct inode *mqueue_get_inode(st struct mqueue_inode_info *info; struct task_struct *p = current; struct user_struct *u = p->user; + struct vx_info *vxi = p->vx_info; unsigned long mq_bytes, mq_msg_tblsz; inode->i_fop = &mqueue_file_operations; @@ -135,6 +137,7 @@ static struct inode *mqueue_get_inode(st info->notify_owner = NULL; info->qsize = 0; info->user = NULL; /* set when all is ok */ + info->vxi = NULL; memset(&info->attr, 0, sizeof(info->attr)); info->attr.mq_maxmsg = DFLT_MSGMAX; info->attr.mq_msgsize = DFLT_MSGSIZEMAX; @@ -150,24 +153,25 @@ static struct inode *mqueue_get_inode(st if (u->mq_bytes + mq_bytes < u->mq_bytes || u->mq_bytes + mq_bytes > p->signal->rlim[RLIMIT_MSGQUEUE].rlim_cur || - !vx_ipcmsg_avail(p->vx_info, mq_bytes)) { + !vx_ipcmsg_avail(vxi, mq_bytes)) { spin_unlock(&mq_lock); goto out_inode; } u->mq_bytes += mq_bytes; - vx_ipcmsg_add(p->vx_info, u, mq_bytes); + vx_ipcmsg_add(vxi, u, mq_bytes); spin_unlock(&mq_lock); info->messages = kmalloc(mq_msg_tblsz, GFP_KERNEL); if (!info->messages) { spin_lock(&mq_lock); u->mq_bytes -= mq_bytes; - vx_ipcmsg_sub(p->vx_info, u, mq_bytes); + vx_ipcmsg_sub(vxi, u, mq_bytes); spin_unlock(&mq_lock); goto out_inode; } /* all is ok */ info->user = get_uid(u); + info->vxi = get_vx_info(vxi); } else if (S_ISDIR(mode)) { inc_nlink(inode); /* Some things misbehave if size == 0 on a directory */ @@ -258,7 +262,7 @@ static void mqueue_delete_inode(struct i (info->attr.mq_maxmsg * info->attr.mq_msgsize)); user = info->user; if (user) { - struct vx_info *vxi = lookup_vx_info(user->xid); + struct vx_info *vxi = info->vxi; spin_lock(&mq_lock); user->mq_bytes -= mq_bytes;