]> git.pld-linux.org Git - packages/kernel.git/blobdiff - kernel-vserver-2.3.patch
- overlay fs merged upstream
[packages/kernel.git] / kernel-vserver-2.3.patch
index d740681942728e7b10e11b420f59cf4c0b0f5ba0..7942b7dd572cafd772a592f97c57e7562b40f68d 100644 (file)
@@ -2937,10 +2937,10 @@ diff -NurpP --minimal linux-3.13.10/fs/ext4/inode.c linux-3.13.10-vs2.3.6.11/fs/
        if (flags & EXT4_DIRSYNC_FL)
                new_fl |= S_DIRSYNC;
 +
-       set_mask_bits(&inode->i_flags,
--                    S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC, new_fl);
+       inode_set_flags(inode, new_fl,
+-                      S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC);
 +              S_IXUNLINK | S_IMMUTABLE |
-+              S_SYNC | S_APPEND | S_NOATIME | S_DIRSYNC, new_fl);
++              S_SYNC | S_APPEND | S_NOATIME | S_DIRSYNC);
 +
 +      new_fl = 0;
 +      if (flags & EXT4_BARRIER_FL)
@@ -4167,23 +4167,50 @@ diff -NurpP --minimal linux-3.13.10/fs/locks.c linux-3.13.10-vs2.3.6.11/fs/locks
  }
  EXPORT_SYMBOL(posix_lock_file);
  
-@@ -1208,7 +1240,7 @@ int locks_mandatory_area(int read_write,
+@@ -1168,6 +1170,7 @@ int locks_mandatory_area(int read_write,
+       struct file_lock fl;
+       int error;
+       bool sleep = false;
++      vxid_t xid;
+       locks_init_lock(&fl);
+       fl.fl_pid = current->tgid;
+@@ -1208,20 +1240,24 @@ int locks_mandatory_area(int read_write,
+       fl.fl_type = (read_write == FLOCK_VERIFY_WRITE) ? F_WRLCK : F_RDLCK;
+       fl.fl_start = offset;
        fl.fl_end = offset + count - 1;
++      if (filp)
++              xid = filp->f_xid;
++      else
++              xid = vx_current_xid();
  
        for (;;) {
+               if (filp) {
+                       fl.fl_owner = (fl_owner_t)filp;
+                       fl.fl_flags &= ~FL_SLEEP;
+-                      error = __posix_lock_file(inode, &fl, NULL);
++                      error = __posix_lock_file(inode, &fl, NULL, xid);
+                       if (!error)
+                               break;
+               }
+               if (sleep)
+                       fl.fl_flags |= FL_SLEEP;
+               fl.fl_owner = current->files;
 -              error = __posix_lock_file(inode, &fl, NULL);
-+              error = __posix_lock_file(inode, &fl, NULL, filp->f_xid);
++              error = __posix_lock_file(inode, &fl, NULL, xid);
                if (error != FILE_LOCK_DEFERRED)
                        break;
                error = wait_event_interruptible(fl.fl_wait, !fl.fl_next);
-@@ -1549,6 +1581,7 @@ static int generic_add_lease(struct file
-               goto out;
-       locks_insert_lock(before, lease);
-+      vx_locks_inc(lease);
-       error = 0;
+@@ -1549,6 +1581,8 @@ static int generic_add_lease(struct file
+       error = check_conflicting_open(dentry, arg);
+       if (error)
+               locks_unlink_lock(flp);
++      else
++              vx_locks_inc(lease);
  out:
        if (is_deleg)
+               mutex_unlock(&inode->i_mutex);
 @@ -1991,6 +2024,11 @@ int fcntl_setlk(unsigned int fd, struct
        if (file_lock == NULL)
                return -ENOLCK;
@@ -4693,7 +4720,7 @@ diff -NurpP --minimal linux-3.13.10/fs/namei.c linux-3.13.10-vs2.3.6.11/fs/namei
 +              old_dentry->d_name.len, old_dentry->d_name.name,
 +              old_dentry->d_name.len);
 +      ret = vfs_rename(dir_nd.path.dentry->d_inode, new_dentry,
-+              old_dentry->d_parent->d_inode, old_dentry, NULL);
++              old_dentry->d_parent->d_inode, old_dentry, NULL, 0);
 +      vxdprintk(VXD_CBIT(misc, 2), "vfs_rename: %d", ret);
 +
 +out_unlock:
@@ -6814,18 +6841,6 @@ diff -NurpP --minimal linux-3.13.10/fs/super.c linux-3.13.10-vs2.3.6.11/fs/super
        error = security_sb_kern_mount(sb, flags, secdata);
        if (error)
                goto out_sb;
-diff -NurpP --minimal linux-3.13.10/fs/kernfs/mount.c linux-3.13.10-vs2.3.6.11/fs/kernfs/mount.c
---- linux-3.13.10/fs/kernfs/mount.c    2013-11-25 15:47:00.000000000 +0000
-+++ linux-3.13.10-vs2.3.6.11/fs/kernfs/mount.c 2014-01-31 20:38:03.000000000 +0000
-@@ -48,7 +48,7 @@ static int sysfs_fill_super(struct super
-       sb->s_blocksize = PAGE_CACHE_SIZE;
-       sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
--      sb->s_magic = SYSFS_MAGIC;
-+      sb->s_magic = SYSFS_SUPER_MAGIC;
-       sb->s_op = &kernfs_sops;
-       sb->s_time_gran = 1;
 diff -NurpP --minimal linux-3.13.10/fs/utimes.c linux-3.13.10-vs2.3.6.11/fs/utimes.c
 --- linux-3.13.10/fs/utimes.c  2014-01-22 20:39:07.000000000 +0000
 +++ linux-3.13.10-vs2.3.6.11/fs/utimes.c       2014-01-31 23:49:14.000000000 +0000
@@ -7401,18 +7416,6 @@ diff -NurpP --minimal linux-3.13.10/include/linux/sunrpc/clnt.h linux-3.13.10-vs
  
        struct rpc_rtt *        cl_rtt;         /* RTO estimator data */
        const struct rpc_timeout *cl_timeout;   /* Timeout strategy */
-diff -NurpP --minimal linux-3.13.10/include/linux/sysfs.h linux-3.13.10-vs2.3.6.11/include/linux/sysfs.h
---- linux-3.13.10/include/linux/sysfs.h        2014-01-22 20:39:11.000000000 +0000
-+++ linux-3.13.10-vs2.3.6.11/include/linux/sysfs.h     2014-01-31 20:38:03.000000000 +0000
-@@ -20,6 +20,8 @@
- #include <linux/stat.h>
- #include <linux/atomic.h>
-+#define SYSFS_SUPER_MAGIC     0x62656572
-+
- struct kobject;
- struct module;
- struct bin_attribute;
 diff -NurpP --minimal linux-3.13.10/include/linux/types.h linux-3.13.10-vs2.3.6.11/include/linux/types.h
 --- linux-3.13.10/include/linux/types.h        2013-02-19 13:58:52.000000000 +0000
 +++ linux-3.13.10-vs2.3.6.11/include/linux/types.h     2014-01-31 20:38:03.000000000 +0000
@@ -7492,7 +7495,7 @@ diff -NurpP --minimal linux-3.13.10/include/linux/uidgid.h linux-3.13.10-vs2.3.6
  
  extern kuid_t make_kuid(struct user_namespace *from, uid_t uid);
  extern kgid_t make_kgid(struct user_namespace *from, gid_t gid);
-+extern krag_t make_ktag(struct user_namespace *from, gid_t gid);
++extern ktag_t make_ktag(struct user_namespace *from, gid_t gid);
  
  extern uid_t from_kuid(struct user_namespace *to, kuid_t uid);
  extern gid_t from_kgid(struct user_namespace *to, kgid_t gid);
@@ -13971,24 +13974,11 @@ diff -NurpP --minimal linux-3.13.10/kernel/sched/cputime.c linux-3.13.10-vs2.3.6
  
  
 @@ -189,9 +193,12 @@ static inline
- void __account_system_time(struct task_struct *p, cputime_t cputime,
-                       cputime_t cputime_scaled, int index)
- {
-+      struct vx_info *vxi = p->vx_info;  /* p is _always_ current */
-+
-       /* Add system time to process. */
-       p->stime += cputime;
-       p->stimescaled += cputime_scaled;
-+      vx_account_system(vxi, cputime, 0 /* do we have idle time? */);
-       account_group_system_time(p, cputime);
-       /* Add system time to cpustat. */
-@@ -215,14 +216,17 @@ static inline void task_group_account_fi
  void account_user_time(struct task_struct *p, cputime_t cputime,
                       cputime_t cputime_scaled)
  {
 +      struct vx_info *vxi = p->vx_info;  /* p is _always_ current */
-+      int nice = (TASK_NICE(p) > 0);
++      int nice = (task_nice(p) > 0);
        int index;
  
        /* Add user time to process. */
@@ -13997,11 +13987,24 @@ diff -NurpP --minimal linux-3.13.10/kernel/sched/cputime.c linux-3.13.10-vs2.3.6
 +      vx_account_user(vxi, cputime, nice);
        account_group_user_time(p, cputime);
  
--      index = (TASK_NICE(p) > 0) ? CPUTIME_NICE : CPUTIME_USER;
+-      index = (task_nice(p) > 0) ? CPUTIME_NICE : CPUTIME_USER;
 +      index = (nice) ? CPUTIME_NICE : CPUTIME_USER;
  
        /* Add user time to cpustat. */
        task_group_account_field(p, index, (__force u64) cputime);
+@@ -215,14 +216,17 @@ static inline void task_group_account_fi
+ void __account_system_time(struct task_struct *p, cputime_t cputime,
+                       cputime_t cputime_scaled, int index)
+ {
++      struct vx_info *vxi = p->vx_info;  /* p is _always_ current */
++
+       /* Add system time to process. */
+       p->stime += cputime;
+       p->stimescaled += cputime_scaled;
++      vx_account_system(vxi, cputime, 0 /* do we have idle time? */);
+       account_group_system_time(p, cputime);
+       /* Add system time to cpustat. */
 diff -NurpP --minimal linux-3.13.10/kernel/sched/fair.c linux-3.13.10-vs2.3.6.11/kernel/sched/fair.c
 --- linux-3.13.10/kernel/sched/fair.c  2014-04-17 01:12:40.000000000 +0000
 +++ linux-3.13.10-vs2.3.6.11/kernel/sched/fair.c       2014-04-17 01:17:11.000000000 +0000
This page took 0.050227 seconds and 4 git commands to generate.