[packages/kernel/LINUX_4_4] - vserver builds without CONFIG_BLK_DEV_VROOT and CONFIG_VSERVER_COWBL; should be fixed soon

arekm arekm at pld-linux.org
Wed Jan 10 22:09:26 CET 2018


commit 927ca60654861dc82f5056f216161dc7efc4c826
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Wed Jan 10 15:24:20 2018 +0100

    - vserver builds without CONFIG_BLK_DEV_VROOT and CONFIG_VSERVER_COWBL; should be fixed soon

 kernel-vserver-2.3.patch | 5329 ++++++++++++++++++++++------------------------
 kernel.spec              |    8 +-
 2 files changed, 2495 insertions(+), 2842 deletions(-)
---
diff --git a/kernel.spec b/kernel.spec
index 668ed57f..34481eb4 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -72,7 +72,7 @@
 
 %define		rel		1
 %define		basever		4.4
-%define		postver		.110
+%define		postver		.111
 
 # define this to '-%{basever}' for longterm branch
 %define		versuffix	-%{basever}
@@ -124,7 +124,7 @@ Source0:	http://www.kernel.org/pub/linux/kernel/v4.x/linux-%{basever}.tar.xz
 # Source0-md5:	9a78fa2eb6c68ca5a40ed5af08142599
 %if "%{postver}" != ".0"
 Patch0:		http://www.kernel.org/pub/linux/kernel/v4.x/patch-%{version}.xz
-# Patch0-md5:	0cab97888a42703dfff4d78f814176ec
+# Patch0-md5:	d23387c591d45b0472bef1488bb4e949
 %endif
 Source1:	kernel.sysconfig
 
@@ -192,8 +192,8 @@ Patch59:	kernel-rndis_host-wm5.patch
 # http://patches.aircrack-ng.org/hostap-kernel-2.6.18.patch
 Patch85:	kernel-hostap.patch
 
-%define	vserver_patch 3.18.5-vs2.3.7.3
-# http://vserver.13thfloor.at/Experimental/patch-3.18.5-vs2.3.7.3.diff
+%define	vserver_patch 4.4.110-vs2.3.9
+# http://vserver.13thfloor.at/Experimental/patch-4.4.110-vs2.3.9-testme.diff
 # note there are additional patches from above url:
 # - *fix* are real fixes (we want these)
 # - *feat* are new features/tests (we don't want these)
diff --git a/kernel-vserver-2.3.patch b/kernel-vserver-2.3.patch
index 1f7aa6f1..f5a6ef2a 100644
--- a/kernel-vserver-2.3.patch
+++ b/kernel-vserver-2.3.patch
@@ -1,6 +1,6 @@
-diff -NurpP --minimal linux-3.18.5/Documentation/vserver/debug.txt linux-3.18.5-vs2.3.7.3/Documentation/vserver/debug.txt
---- linux-3.18.5/Documentation/vserver/debug.txt	1970-01-01 00:00:00.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/Documentation/vserver/debug.txt	2015-01-19 10:57:45.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/Documentation/vserver/debug.txt linux-4.4.110-vs2.3.9/Documentation/vserver/debug.txt
+--- linux-4.4.110/Documentation/vserver/debug.txt	1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.110-vs2.3.9/Documentation/vserver/debug.txt	2018-01-09 16:36:20.000000000 +0000
 @@ -0,0 +1,154 @@
 +
 +debug_cvirt:
@@ -35,12 +35,12 @@ diff -NurpP --minimal linux-3.18.5/Documentation/vserver/debug.txt linux-3.18.5-
 +	"vroot[%d]_get_real_bdev: dev=%p[%lu,%d:%d]"
 +	"vroot[%d]_set_dev: dev=%p[%lu,%d:%d]"
 +	"vroot_get_real_bdev not set"
-+ 1   2	"cow_break_link(�%s�)"
-+	"temp copy �%s�"
++ 1   2	"cow_break_link(?%s?)"
++	"temp copy ?%s?"
 + 2   4	"dentry_open(new): %p"
 +	"dentry_open(old): %p"
 +	"lookup_create(new): %p"
-+	"old path �%s�"
++	"old path ?%s?"
 +	"path_lookup(old): %d"
 +	"vfs_create(new): %d"
 +	"vfs_rename: %d"
@@ -108,7 +108,7 @@ diff -NurpP --minimal linux-3.18.5/Documentation/vserver/debug.txt linux-3.18.5-
 +
 +debug_tag:
 +
-+ 7  80	"dx_parse_tag(�%s�): %d:#%d"
++ 7  80	"dx_parse_tag(?%s?): %d:#%d"
 +	"dx_propagate_tag(%p[#%lu.%d]): %d,%d"
 +
 +debug_xid:
@@ -156,10 +156,10 @@ diff -NurpP --minimal linux-3.18.5/Documentation/vserver/debug.txt linux-3.18.5-
 + m 2^m	"vx_acc_page[%5d,%s,%2d]: %5d%s"
 +	"vx_acc_pages[%5d,%s,%2d]: %5d += %5d"
 +	"vx_pages_avail[%5d,%s,%2d]: %5ld > %5d + %5d"
-diff -NurpP --minimal linux-3.18.5/arch/alpha/Kconfig linux-3.18.5-vs2.3.7.3/arch/alpha/Kconfig
---- linux-3.18.5/arch/alpha/Kconfig	2014-06-12 13:00:27.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/alpha/Kconfig	2015-01-19 10:57:45.000000000 +0000
-@@ -740,6 +740,8 @@ config DUMMY_CONSOLE
+diff -NurpP --minimal linux-4.4.110/arch/alpha/Kconfig linux-4.4.110-vs2.3.9/arch/alpha/Kconfig
+--- linux-4.4.110/arch/alpha/Kconfig	2016-07-05 04:11:34.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/alpha/Kconfig	2018-01-09 16:36:20.000000000 +0000
+@@ -745,6 +745,8 @@ config DUMMY_CONSOLE
  	depends on VGA_HOSE
  	default y
  
@@ -168,9 +168,9 @@ diff -NurpP --minimal linux-3.18.5/arch/alpha/Kconfig linux-3.18.5-vs2.3.7.3/arc
  source "security/Kconfig"
  
  source "crypto/Kconfig"
-diff -NurpP --minimal linux-3.18.5/arch/alpha/kernel/systbls.S linux-3.18.5-vs2.3.7.3/arch/alpha/kernel/systbls.S
---- linux-3.18.5/arch/alpha/kernel/systbls.S	2015-01-16 22:18:10.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/alpha/kernel/systbls.S	2015-01-19 10:57:45.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/arch/alpha/kernel/systbls.S linux-4.4.110-vs2.3.9/arch/alpha/kernel/systbls.S
+--- linux-4.4.110/arch/alpha/kernel/systbls.S	2015-07-06 20:41:36.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/alpha/kernel/systbls.S	2018-01-09 16:36:20.000000000 +0000
 @@ -446,7 +446,7 @@ sys_call_table:
  	.quad sys_stat64			/* 425 */
  	.quad sys_lstat64
@@ -180,10 +180,10 @@ diff -NurpP --minimal linux-3.18.5/arch/alpha/kernel/systbls.S linux-3.18.5-vs2.
  	.quad sys_ni_syscall			/* sys_mbind */
  	.quad sys_ni_syscall			/* sys_get_mempolicy */
  	.quad sys_ni_syscall			/* sys_set_mempolicy */
-diff -NurpP --minimal linux-3.18.5/arch/alpha/kernel/traps.c linux-3.18.5-vs2.3.7.3/arch/alpha/kernel/traps.c
---- linux-3.18.5/arch/alpha/kernel/traps.c	2014-01-22 20:38:10.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/alpha/kernel/traps.c	2015-01-19 10:57:45.000000000 +0000
-@@ -175,7 +175,8 @@ die_if_kernel(char * str, struct pt_regs
+diff -NurpP --minimal linux-4.4.110/arch/alpha/kernel/traps.c linux-4.4.110-vs2.3.9/arch/alpha/kernel/traps.c
+--- linux-4.4.110/arch/alpha/kernel/traps.c	2015-07-06 20:41:36.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/alpha/kernel/traps.c	2018-01-09 16:36:20.000000000 +0000
+@@ -174,7 +174,8 @@ die_if_kernel(char * str, struct pt_regs
  #ifdef CONFIG_SMP
  	printk("CPU %d ", hard_smp_processor_id());
  #endif
@@ -193,10 +193,10 @@ diff -NurpP --minimal linux-3.18.5/arch/alpha/kernel/traps.c linux-3.18.5-vs2.3.
  	dik_show_regs(regs, r9_15);
  	add_taint(TAINT_DIE, LOCKDEP_NOW_UNRELIABLE);
  	dik_show_trace((unsigned long *)(regs+1));
-diff -NurpP --minimal linux-3.18.5/arch/arm/Kconfig linux-3.18.5-vs2.3.7.3/arch/arm/Kconfig
---- linux-3.18.5/arch/arm/Kconfig	2015-01-17 02:39:30.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/arm/Kconfig	2015-01-19 10:57:45.000000000 +0000
-@@ -2170,6 +2170,8 @@ source "fs/Kconfig"
+diff -NurpP --minimal linux-4.4.110/arch/arm/Kconfig linux-4.4.110-vs2.3.9/arch/arm/Kconfig
+--- linux-4.4.110/arch/arm/Kconfig	2016-07-05 04:14:23.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/arm/Kconfig	2018-01-09 16:36:20.000000000 +0000
+@@ -2159,6 +2159,8 @@ source "fs/Kconfig"
  
  source "arch/arm/Kconfig.debug"
  
@@ -205,9 +205,9 @@ diff -NurpP --minimal linux-3.18.5/arch/arm/Kconfig linux-3.18.5-vs2.3.7.3/arch/
  source "security/Kconfig"
  
  source "crypto/Kconfig"
-diff -NurpP --minimal linux-3.18.5/arch/arm/kernel/calls.S linux-3.18.5-vs2.3.7.3/arch/arm/kernel/calls.S
---- linux-3.18.5/arch/arm/kernel/calls.S	2015-01-17 02:39:31.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/arm/kernel/calls.S	2015-01-19 10:57:45.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/arch/arm/kernel/calls.S linux-4.4.110-vs2.3.9/arch/arm/kernel/calls.S
+--- linux-4.4.110/arch/arm/kernel/calls.S	2016-07-05 04:14:26.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/arm/kernel/calls.S	2018-01-09 16:36:20.000000000 +0000
 @@ -322,7 +322,7 @@
  /* 310 */	CALL(sys_request_key)
  		CALL(sys_keyctl)
@@ -217,24 +217,24 @@ diff -NurpP --minimal linux-3.18.5/arch/arm/kernel/calls.S linux-3.18.5-vs2.3.7.
  		CALL(sys_ioprio_set)
  /* 315 */	CALL(sys_ioprio_get)
  		CALL(sys_inotify_init)
-diff -NurpP --minimal linux-3.18.5/arch/arm/kernel/traps.c linux-3.18.5-vs2.3.7.3/arch/arm/kernel/traps.c
---- linux-3.18.5/arch/arm/kernel/traps.c	2015-01-17 02:39:31.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/arm/kernel/traps.c	2015-01-19 10:57:45.000000000 +0000
-@@ -250,8 +250,8 @@ static int __die(const char *str, int er
+diff -NurpP --minimal linux-4.4.110/arch/arm/kernel/traps.c linux-4.4.110-vs2.3.9/arch/arm/kernel/traps.c
+--- linux-4.4.110/arch/arm/kernel/traps.c	2018-01-09 16:34:28.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/arm/kernel/traps.c	2018-01-09 16:36:20.000000000 +0000
+@@ -258,8 +258,8 @@ static int __die(const char *str, int er
  
  	print_modules();
  	__show_regs(regs);
--	printk(KERN_EMERG "Process %.*s (pid: %d, stack limit = 0x%p)\n",
--		TASK_COMM_LEN, tsk->comm, task_pid_nr(tsk), end_of_stack(tsk));
-+	printk(KERN_EMERG "Process %.*s (pid: %d:#%u, stack limit = 0x%p)\n",
-+		TASK_COMM_LEN, tsk->comm, task_pid_nr(tsk), tsk->xid, end_of_stack(tsk));
+-	pr_emerg("Process %.*s (pid: %d, stack limit = 0x%p)\n",
+-		 TASK_COMM_LEN, tsk->comm, task_pid_nr(tsk), end_of_stack(tsk));
++	pr_emerg("Process %.*s (pid: %d:%u, stack limit = 0x%p)\n",
++		 TASK_COMM_LEN, tsk->comm, task_pid_nr(tsk), tsk->xid, end_of_stack(tsk));
  
  	if (!user_mode(regs) || in_interrupt()) {
  		dump_mem(KERN_EMERG, "Stack: ", regs->ARM_sp,
-diff -NurpP --minimal linux-3.18.5/arch/cris/Kconfig linux-3.18.5-vs2.3.7.3/arch/cris/Kconfig
---- linux-3.18.5/arch/cris/Kconfig	2014-06-12 13:00:42.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/cris/Kconfig	2015-01-19 10:57:45.000000000 +0000
-@@ -556,6 +556,8 @@ source "fs/Kconfig"
+diff -NurpP --minimal linux-4.4.110/arch/cris/Kconfig linux-4.4.110-vs2.3.9/arch/cris/Kconfig
+--- linux-4.4.110/arch/cris/Kconfig	2016-07-05 04:14:27.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/cris/Kconfig	2018-01-09 16:36:20.000000000 +0000
+@@ -581,6 +581,8 @@ source "fs/Kconfig"
  
  source "arch/cris/Kconfig.debug"
  
@@ -243,10 +243,10 @@ diff -NurpP --minimal linux-3.18.5/arch/cris/Kconfig linux-3.18.5-vs2.3.7.3/arch
  source "security/Kconfig"
  
  source "crypto/Kconfig"
-diff -NurpP --minimal linux-3.18.5/arch/ia64/Kconfig linux-3.18.5-vs2.3.7.3/arch/ia64/Kconfig
---- linux-3.18.5/arch/ia64/Kconfig	2015-01-16 22:18:19.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/ia64/Kconfig	2015-01-19 10:57:45.000000000 +0000
-@@ -636,6 +636,8 @@ source "fs/Kconfig"
+diff -NurpP --minimal linux-4.4.110/arch/ia64/Kconfig linux-4.4.110-vs2.3.9/arch/ia64/Kconfig
+--- linux-4.4.110/arch/ia64/Kconfig	2016-07-05 04:11:39.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/ia64/Kconfig	2018-01-09 16:36:21.000000000 +0000
+@@ -606,6 +606,8 @@ source "fs/Kconfig"
  
  source "arch/ia64/Kconfig.debug"
  
@@ -255,10 +255,10 @@ diff -NurpP --minimal linux-3.18.5/arch/ia64/Kconfig linux-3.18.5-vs2.3.7.3/arch
  source "security/Kconfig"
  
  source "crypto/Kconfig"
-diff -NurpP --minimal linux-3.18.5/arch/ia64/kernel/entry.S linux-3.18.5-vs2.3.7.3/arch/ia64/kernel/entry.S
---- linux-3.18.5/arch/ia64/kernel/entry.S	2015-01-17 02:39:35.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/ia64/kernel/entry.S	2015-01-19 10:57:45.000000000 +0000
-@@ -1706,7 +1706,7 @@ sys_call_table:
+diff -NurpP --minimal linux-4.4.110/arch/ia64/kernel/entry.S linux-4.4.110-vs2.3.9/arch/ia64/kernel/entry.S
+--- linux-4.4.110/arch/ia64/kernel/entry.S	2016-07-05 04:14:27.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/ia64/kernel/entry.S	2018-01-09 16:36:21.000000000 +0000
+@@ -1694,7 +1694,7 @@ sys_call_table:
  	data8 sys_mq_notify
  	data8 sys_mq_getsetattr
  	data8 sys_kexec_load
@@ -267,9 +267,9 @@ diff -NurpP --minimal linux-3.18.5/arch/ia64/kernel/entry.S linux-3.18.5-vs2.3.7
  	data8 sys_waitid			// 1270
  	data8 sys_add_key
  	data8 sys_request_key
-diff -NurpP --minimal linux-3.18.5/arch/ia64/kernel/ptrace.c linux-3.18.5-vs2.3.7.3/arch/ia64/kernel/ptrace.c
---- linux-3.18.5/arch/ia64/kernel/ptrace.c	2015-01-17 02:39:35.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/ia64/kernel/ptrace.c	2015-01-19 10:57:45.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/arch/ia64/kernel/ptrace.c linux-4.4.110-vs2.3.9/arch/ia64/kernel/ptrace.c
+--- linux-4.4.110/arch/ia64/kernel/ptrace.c	2015-04-12 22:12:50.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/ia64/kernel/ptrace.c	2018-01-09 16:36:21.000000000 +0000
 @@ -21,6 +21,7 @@
  #include <linux/regset.h>
  #include <linux/elf.h>
@@ -278,9 +278,9 @@ diff -NurpP --minimal linux-3.18.5/arch/ia64/kernel/ptrace.c linux-3.18.5-vs2.3.
  
  #include <asm/pgtable.h>
  #include <asm/processor.h>
-diff -NurpP --minimal linux-3.18.5/arch/ia64/kernel/traps.c linux-3.18.5-vs2.3.7.3/arch/ia64/kernel/traps.c
---- linux-3.18.5/arch/ia64/kernel/traps.c	2015-01-17 02:39:35.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/ia64/kernel/traps.c	2015-01-19 10:57:45.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/arch/ia64/kernel/traps.c linux-4.4.110-vs2.3.9/arch/ia64/kernel/traps.c
+--- linux-4.4.110/arch/ia64/kernel/traps.c	2015-04-12 22:12:50.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/ia64/kernel/traps.c	2018-01-09 16:36:21.000000000 +0000
 @@ -60,8 +60,9 @@ die (const char *str, struct pt_regs *re
  	put_cpu();
  
@@ -305,9 +305,9 @@ diff -NurpP --minimal linux-3.18.5/arch/ia64/kernel/traps.c linux-3.18.5-vs2.3.7
  			}
  		}
  	}
-diff -NurpP --minimal linux-3.18.5/arch/m32r/kernel/traps.c linux-3.18.5-vs2.3.7.3/arch/m32r/kernel/traps.c
---- linux-3.18.5/arch/m32r/kernel/traps.c	2013-07-14 17:00:26.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/m32r/kernel/traps.c	2015-01-19 10:57:45.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/arch/m32r/kernel/traps.c linux-4.4.110-vs2.3.9/arch/m32r/kernel/traps.c
+--- linux-4.4.110/arch/m32r/kernel/traps.c	2015-04-12 22:12:50.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/m32r/kernel/traps.c	2018-01-09 16:36:21.000000000 +0000
 @@ -184,8 +184,9 @@ static void show_registers(struct pt_reg
  	} else {
  		printk("SPI: %08lx\n", sp);
@@ -320,10 +320,10 @@ diff -NurpP --minimal linux-3.18.5/arch/m32r/kernel/traps.c linux-3.18.5-vs2.3.7
  
  	/*
  	 * When in-kernel, we also print out the stack and code at the
-diff -NurpP --minimal linux-3.18.5/arch/m68k/Kconfig linux-3.18.5-vs2.3.7.3/arch/m68k/Kconfig
---- linux-3.18.5/arch/m68k/Kconfig	2014-06-12 13:00:43.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/m68k/Kconfig	2015-01-19 10:57:45.000000000 +0000
-@@ -159,6 +159,8 @@ source "fs/Kconfig"
+diff -NurpP --minimal linux-4.4.110/arch/m68k/Kconfig linux-4.4.110-vs2.3.9/arch/m68k/Kconfig
+--- linux-4.4.110/arch/m68k/Kconfig	2016-07-05 04:11:39.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/m68k/Kconfig	2018-01-09 16:36:21.000000000 +0000
+@@ -164,6 +164,8 @@ source "fs/Kconfig"
  
  source "arch/m68k/Kconfig.debug"
  
@@ -332,10 +332,10 @@ diff -NurpP --minimal linux-3.18.5/arch/m68k/Kconfig linux-3.18.5-vs2.3.7.3/arch
  source "security/Kconfig"
  
  source "crypto/Kconfig"
-diff -NurpP --minimal linux-3.18.5/arch/mips/Kconfig linux-3.18.5-vs2.3.7.3/arch/mips/Kconfig
---- linux-3.18.5/arch/mips/Kconfig	2015-01-17 02:39:35.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/mips/Kconfig	2015-01-19 10:57:45.000000000 +0000
-@@ -2712,6 +2712,8 @@ source "fs/Kconfig"
+diff -NurpP --minimal linux-4.4.110/arch/mips/Kconfig linux-4.4.110-vs2.3.9/arch/mips/Kconfig
+--- linux-4.4.110/arch/mips/Kconfig	2018-01-09 16:34:30.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/mips/Kconfig	2018-01-09 16:36:21.000000000 +0000
+@@ -3026,6 +3026,8 @@ source "fs/Kconfig"
  
  source "arch/mips/Kconfig.debug"
  
@@ -344,10 +344,10 @@ diff -NurpP --minimal linux-3.18.5/arch/mips/Kconfig linux-3.18.5-vs2.3.7.3/arch
  source "security/Kconfig"
  
  source "crypto/Kconfig"
-diff -NurpP --minimal linux-3.18.5/arch/mips/kernel/ptrace.c linux-3.18.5-vs2.3.7.3/arch/mips/kernel/ptrace.c
---- linux-3.18.5/arch/mips/kernel/ptrace.c	2015-01-17 02:39:36.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/mips/kernel/ptrace.c	2015-01-19 10:57:45.000000000 +0000
-@@ -29,6 +29,7 @@
+diff -NurpP --minimal linux-4.4.110/arch/mips/kernel/ptrace.c linux-4.4.110-vs2.3.9/arch/mips/kernel/ptrace.c
+--- linux-4.4.110/arch/mips/kernel/ptrace.c	2018-01-09 16:34:30.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/mips/kernel/ptrace.c	2018-01-09 16:36:21.000000000 +0000
+@@ -30,6 +30,7 @@
  #include <linux/audit.h>
  #include <linux/seccomp.h>
  #include <linux/ftrace.h>
@@ -355,7 +355,7 @@ diff -NurpP --minimal linux-3.18.5/arch/mips/kernel/ptrace.c linux-3.18.5-vs2.3.
  
  #include <asm/byteorder.h>
  #include <asm/cpu.h>
-@@ -544,6 +545,9 @@ long arch_ptrace(struct task_struct *chi
+@@ -690,6 +691,9 @@ long arch_ptrace(struct task_struct *chi
  	void __user *datavp = (void __user *) data;
  	unsigned long __user *datalp = (void __user *) data;
  
@@ -365,10 +365,10 @@ diff -NurpP --minimal linux-3.18.5/arch/mips/kernel/ptrace.c linux-3.18.5-vs2.3.
  	switch (request) {
  	/* when I and D space are separate, these will need to be fixed. */
  	case PTRACE_PEEKTEXT: /* read word at location addr. */
-diff -NurpP --minimal linux-3.18.5/arch/mips/kernel/scall32-o32.S linux-3.18.5-vs2.3.7.3/arch/mips/kernel/scall32-o32.S
---- linux-3.18.5/arch/mips/kernel/scall32-o32.S	2015-01-17 02:39:36.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/mips/kernel/scall32-o32.S	2015-01-19 10:57:45.000000000 +0000
-@@ -501,7 +501,7 @@ EXPORT(sys_call_table)
+diff -NurpP --minimal linux-4.4.110/arch/mips/kernel/scall32-o32.S linux-4.4.110-vs2.3.9/arch/mips/kernel/scall32-o32.S
+--- linux-4.4.110/arch/mips/kernel/scall32-o32.S	2018-01-09 16:34:30.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/mips/kernel/scall32-o32.S	2018-01-09 16:36:21.000000000 +0000
+@@ -512,7 +512,7 @@ EXPORT(sys_call_table)
  	PTR	sys_mq_timedreceive
  	PTR	sys_mq_notify			/* 4275 */
  	PTR	sys_mq_getsetattr
@@ -377,10 +377,10 @@ diff -NurpP --minimal linux-3.18.5/arch/mips/kernel/scall32-o32.S linux-3.18.5-v
  	PTR	sys_waitid
  	PTR	sys_ni_syscall			/* available, was setaltroot */
  	PTR	sys_add_key			/* 4280 */
-diff -NurpP --minimal linux-3.18.5/arch/mips/kernel/scall64-64.S linux-3.18.5-vs2.3.7.3/arch/mips/kernel/scall64-64.S
---- linux-3.18.5/arch/mips/kernel/scall64-64.S	2015-01-17 02:39:36.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/mips/kernel/scall64-64.S	2015-01-19 10:57:45.000000000 +0000
-@@ -355,7 +355,7 @@ EXPORT(sys_call_table)
+diff -NurpP --minimal linux-4.4.110/arch/mips/kernel/scall64-64.S linux-4.4.110-vs2.3.9/arch/mips/kernel/scall64-64.S
+--- linux-4.4.110/arch/mips/kernel/scall64-64.S	2018-01-09 16:34:30.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/mips/kernel/scall64-64.S	2018-01-09 16:36:21.000000000 +0000
+@@ -349,7 +349,7 @@ EXPORT(sys_call_table)
  	PTR	sys_mq_timedreceive
  	PTR	sys_mq_notify
  	PTR	sys_mq_getsetattr		/* 5235 */
@@ -389,10 +389,10 @@ diff -NurpP --minimal linux-3.18.5/arch/mips/kernel/scall64-64.S linux-3.18.5-vs
  	PTR	sys_waitid
  	PTR	sys_ni_syscall			/* available, was setaltroot */
  	PTR	sys_add_key
-diff -NurpP --minimal linux-3.18.5/arch/mips/kernel/scall64-n32.S linux-3.18.5-vs2.3.7.3/arch/mips/kernel/scall64-n32.S
---- linux-3.18.5/arch/mips/kernel/scall64-n32.S	2015-01-17 02:39:36.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/mips/kernel/scall64-n32.S	2015-01-19 10:57:45.000000000 +0000
-@@ -348,7 +348,7 @@ EXPORT(sysn32_call_table)
+diff -NurpP --minimal linux-4.4.110/arch/mips/kernel/scall64-n32.S linux-4.4.110-vs2.3.9/arch/mips/kernel/scall64-n32.S
+--- linux-4.4.110/arch/mips/kernel/scall64-n32.S	2018-01-09 16:34:30.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/mips/kernel/scall64-n32.S	2018-01-09 16:36:21.000000000 +0000
+@@ -339,7 +339,7 @@ EXPORT(sysn32_call_table)
  	PTR	compat_sys_mq_timedreceive
  	PTR	compat_sys_mq_notify
  	PTR	compat_sys_mq_getsetattr
@@ -401,10 +401,10 @@ diff -NurpP --minimal linux-3.18.5/arch/mips/kernel/scall64-n32.S linux-3.18.5-v
  	PTR	compat_sys_waitid
  	PTR	sys_ni_syscall			/* available, was setaltroot */
  	PTR	sys_add_key
-diff -NurpP --minimal linux-3.18.5/arch/mips/kernel/scall64-o32.S linux-3.18.5-vs2.3.7.3/arch/mips/kernel/scall64-o32.S
---- linux-3.18.5/arch/mips/kernel/scall64-o32.S	2015-01-17 02:39:36.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/mips/kernel/scall64-o32.S	2015-01-19 10:57:45.000000000 +0000
-@@ -486,7 +486,7 @@ EXPORT(sys32_call_table)
+diff -NurpP --minimal linux-4.4.110/arch/mips/kernel/scall64-o32.S linux-4.4.110-vs2.3.9/arch/mips/kernel/scall64-o32.S
+--- linux-4.4.110/arch/mips/kernel/scall64-o32.S	2018-01-09 16:34:30.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/mips/kernel/scall64-o32.S	2018-01-09 16:36:21.000000000 +0000
+@@ -495,7 +495,7 @@ EXPORT(sys32_call_table)
  	PTR	compat_sys_mq_timedreceive
  	PTR	compat_sys_mq_notify		/* 4275 */
  	PTR	compat_sys_mq_getsetattr
@@ -413,10 +413,10 @@ diff -NurpP --minimal linux-3.18.5/arch/mips/kernel/scall64-o32.S linux-3.18.5-v
  	PTR	compat_sys_waitid
  	PTR	sys_ni_syscall			/* available, was setaltroot */
  	PTR	sys_add_key			/* 4280 */
-diff -NurpP --minimal linux-3.18.5/arch/mips/kernel/traps.c linux-3.18.5-vs2.3.7.3/arch/mips/kernel/traps.c
---- linux-3.18.5/arch/mips/kernel/traps.c	2015-01-16 22:18:20.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/mips/kernel/traps.c	2015-01-19 10:57:45.000000000 +0000
-@@ -341,9 +341,10 @@ void show_registers(struct pt_regs *regs
+diff -NurpP --minimal linux-4.4.110/arch/mips/kernel/traps.c linux-4.4.110-vs2.3.9/arch/mips/kernel/traps.c
+--- linux-4.4.110/arch/mips/kernel/traps.c	2018-01-09 16:34:30.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/mips/kernel/traps.c	2018-01-09 16:36:21.000000000 +0000
+@@ -353,9 +353,10 @@ void show_registers(struct pt_regs *regs
  
  	__show_regs(regs);
  	print_modules();
@@ -430,10 +430,10 @@ diff -NurpP --minimal linux-3.18.5/arch/mips/kernel/traps.c linux-3.18.5-vs2.3.7
  	if (cpu_has_userlocal) {
  		unsigned long tls;
  
-diff -NurpP --minimal linux-3.18.5/arch/parisc/Kconfig linux-3.18.5-vs2.3.7.3/arch/parisc/Kconfig
---- linux-3.18.5/arch/parisc/Kconfig	2015-01-16 22:18:21.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/parisc/Kconfig	2015-01-19 10:57:45.000000000 +0000
-@@ -337,6 +337,8 @@ config SECCOMP
+diff -NurpP --minimal linux-4.4.110/arch/parisc/Kconfig linux-4.4.110-vs2.3.9/arch/parisc/Kconfig
+--- linux-4.4.110/arch/parisc/Kconfig	2016-07-05 04:14:29.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/parisc/Kconfig	2018-01-09 16:36:21.000000000 +0000
+@@ -341,6 +341,8 @@ config SECCOMP
  
  	  If unsure, say Y. Only embedded should say N here.
  
@@ -442,9 +442,9 @@ diff -NurpP --minimal linux-3.18.5/arch/parisc/Kconfig linux-3.18.5-vs2.3.7.3/ar
  source "security/Kconfig"
  
  source "crypto/Kconfig"
-diff -NurpP --minimal linux-3.18.5/arch/parisc/kernel/syscall_table.S linux-3.18.5-vs2.3.7.3/arch/parisc/kernel/syscall_table.S
---- linux-3.18.5/arch/parisc/kernel/syscall_table.S	2015-01-17 02:39:36.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/parisc/kernel/syscall_table.S	2015-01-19 10:57:45.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/arch/parisc/kernel/syscall_table.S linux-4.4.110-vs2.3.9/arch/parisc/kernel/syscall_table.S
+--- linux-4.4.110/arch/parisc/kernel/syscall_table.S	2018-01-09 16:34:31.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/parisc/kernel/syscall_table.S	2018-01-09 16:36:21.000000000 +0000
 @@ -358,7 +358,7 @@
  	ENTRY_COMP(mbind)		/* 260 */
  	ENTRY_COMP(get_mempolicy)
@@ -453,11 +453,11 @@ diff -NurpP --minimal linux-3.18.5/arch/parisc/kernel/syscall_table.S linux-3.18
 +	ENTRY_DIFF(vserver)
  	ENTRY_SAME(add_key)
  	ENTRY_SAME(request_key)		/* 265 */
- 	ENTRY_SAME(keyctl)
-diff -NurpP --minimal linux-3.18.5/arch/parisc/kernel/traps.c linux-3.18.5-vs2.3.7.3/arch/parisc/kernel/traps.c
---- linux-3.18.5/arch/parisc/kernel/traps.c	2014-06-12 13:01:26.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/parisc/kernel/traps.c	2015-01-19 10:57:45.000000000 +0000
-@@ -239,8 +239,9 @@ void die_if_kernel(char *str, struct pt_
+ 	ENTRY_COMP(keyctl)
+diff -NurpP --minimal linux-4.4.110/arch/parisc/kernel/traps.c linux-4.4.110-vs2.3.9/arch/parisc/kernel/traps.c
+--- linux-4.4.110/arch/parisc/kernel/traps.c	2018-01-09 16:34:31.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/parisc/kernel/traps.c	2018-01-09 16:36:21.000000000 +0000
+@@ -235,8 +235,9 @@ void die_if_kernel(char *str, struct pt_
  			return; /* STFU */
  
  		parisc_printk_ratelimited(1, regs,
@@ -469,7 +469,7 @@ diff -NurpP --minimal linux-3.18.5/arch/parisc/kernel/traps.c linux-3.18.5-vs2.3
  
  		return;
  	}
-@@ -270,8 +271,8 @@ void die_if_kernel(char *str, struct pt_
+@@ -266,8 +267,8 @@ void die_if_kernel(char *str, struct pt_
  		pdc_console_restart();
  	
  	if (err)
@@ -480,10 +480,10 @@ diff -NurpP --minimal linux-3.18.5/arch/parisc/kernel/traps.c linux-3.18.5-vs2.3
  
  	/* Wot's wrong wif bein' racy? */
  	if (current->thread.flags & PARISC_KERNEL_DEATH) {
-diff -NurpP --minimal linux-3.18.5/arch/powerpc/Kconfig linux-3.18.5-vs2.3.7.3/arch/powerpc/Kconfig
---- linux-3.18.5/arch/powerpc/Kconfig	2015-01-17 02:39:36.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/powerpc/Kconfig	2015-01-19 10:57:46.000000000 +0000
-@@ -1068,6 +1068,8 @@ source "lib/Kconfig"
+diff -NurpP --minimal linux-4.4.110/arch/powerpc/Kconfig linux-4.4.110-vs2.3.9/arch/powerpc/Kconfig
+--- linux-4.4.110/arch/powerpc/Kconfig	2018-01-09 16:34:31.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/powerpc/Kconfig	2018-01-09 16:36:21.000000000 +0000
+@@ -1080,6 +1080,8 @@ source "lib/Kconfig"
  
  source "arch/powerpc/Kconfig.debug"
  
@@ -491,10 +491,10 @@ diff -NurpP --minimal linux-3.18.5/arch/powerpc/Kconfig linux-3.18.5-vs2.3.7.3/a
 +
  source "security/Kconfig"
  
- config KEYS_COMPAT
-diff -NurpP --minimal linux-3.18.5/arch/powerpc/include/uapi/asm/unistd.h linux-3.18.5-vs2.3.7.3/arch/powerpc/include/uapi/asm/unistd.h
---- linux-3.18.5/arch/powerpc/include/uapi/asm/unistd.h	2015-01-17 02:39:36.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/powerpc/include/uapi/asm/unistd.h	2015-01-19 10:57:46.000000000 +0000
+ source "crypto/Kconfig"
+diff -NurpP --minimal linux-4.4.110/arch/powerpc/include/uapi/asm/unistd.h linux-4.4.110-vs2.3.9/arch/powerpc/include/uapi/asm/unistd.h
+--- linux-4.4.110/arch/powerpc/include/uapi/asm/unistd.h	2016-07-05 04:14:29.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/powerpc/include/uapi/asm/unistd.h	2018-01-09 16:36:21.000000000 +0000
 @@ -275,7 +275,7 @@
  #endif
  #define __NR_rtas		255
@@ -504,10 +504,10 @@ diff -NurpP --minimal linux-3.18.5/arch/powerpc/include/uapi/asm/unistd.h linux-
  #define __NR_migrate_pages	258
  #define __NR_mbind		259
  #define __NR_get_mempolicy	260
-diff -NurpP --minimal linux-3.18.5/arch/powerpc/kernel/traps.c linux-3.18.5-vs2.3.7.3/arch/powerpc/kernel/traps.c
---- linux-3.18.5/arch/powerpc/kernel/traps.c	2015-01-16 22:18:21.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/powerpc/kernel/traps.c	2015-01-19 10:57:46.000000000 +0000
-@@ -1313,8 +1313,9 @@ void nonrecoverable_exception(struct pt_
+diff -NurpP --minimal linux-4.4.110/arch/powerpc/kernel/traps.c linux-4.4.110-vs2.3.9/arch/powerpc/kernel/traps.c
+--- linux-4.4.110/arch/powerpc/kernel/traps.c	2018-01-09 16:34:31.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/powerpc/kernel/traps.c	2018-01-09 16:36:21.000000000 +0000
+@@ -1315,8 +1315,9 @@ void nonrecoverable_exception(struct pt_
  
  void trace_syscall(struct pt_regs *regs)
  {
@@ -519,10 +519,10 @@ diff -NurpP --minimal linux-3.18.5/arch/powerpc/kernel/traps.c linux-3.18.5-vs2.
  	       regs->ccr&0x10000000?"Error=":"", regs->gpr[3], print_tainted());
  }
  
-diff -NurpP --minimal linux-3.18.5/arch/s390/Kconfig linux-3.18.5-vs2.3.7.3/arch/s390/Kconfig
---- linux-3.18.5/arch/s390/Kconfig	2015-01-17 02:39:40.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/s390/Kconfig	2015-01-19 10:57:46.000000000 +0000
-@@ -652,6 +652,8 @@ source "fs/Kconfig"
+diff -NurpP --minimal linux-4.4.110/arch/s390/Kconfig linux-4.4.110-vs2.3.9/arch/s390/Kconfig
+--- linux-4.4.110/arch/s390/Kconfig	2018-01-09 16:34:32.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/s390/Kconfig	2018-01-09 16:36:21.000000000 +0000
+@@ -729,6 +729,8 @@ source "fs/Kconfig"
  
  source "arch/s390/Kconfig.debug"
  
@@ -531,9 +531,9 @@ diff -NurpP --minimal linux-3.18.5/arch/s390/Kconfig linux-3.18.5-vs2.3.7.3/arch
  source "security/Kconfig"
  
  source "crypto/Kconfig"
-diff -NurpP --minimal linux-3.18.5/arch/s390/include/asm/tlb.h linux-3.18.5-vs2.3.7.3/arch/s390/include/asm/tlb.h
---- linux-3.18.5/arch/s390/include/asm/tlb.h	2015-01-17 02:39:41.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/s390/include/asm/tlb.h	2015-01-19 10:57:46.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/arch/s390/include/asm/tlb.h linux-4.4.110-vs2.3.9/arch/s390/include/asm/tlb.h
+--- linux-4.4.110/arch/s390/include/asm/tlb.h	2015-07-06 20:41:37.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/s390/include/asm/tlb.h	2018-01-09 16:36:21.000000000 +0000
 @@ -24,6 +24,7 @@
  #include <linux/mm.h>
  #include <linux/pagemap.h>
@@ -542,21 +542,21 @@ diff -NurpP --minimal linux-3.18.5/arch/s390/include/asm/tlb.h linux-3.18.5-vs2.
  #include <asm/processor.h>
  #include <asm/pgalloc.h>
  #include <asm/tlbflush.h>
-diff -NurpP --minimal linux-3.18.5/arch/s390/include/uapi/asm/unistd.h linux-3.18.5-vs2.3.7.3/arch/s390/include/uapi/asm/unistd.h
---- linux-3.18.5/arch/s390/include/uapi/asm/unistd.h	2015-01-17 02:39:41.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/s390/include/uapi/asm/unistd.h	2015-01-19 10:57:46.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/arch/s390/include/uapi/asm/unistd.h linux-4.4.110-vs2.3.9/arch/s390/include/uapi/asm/unistd.h
+--- linux-4.4.110/arch/s390/include/uapi/asm/unistd.h	2016-07-05 04:14:30.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/s390/include/uapi/asm/unistd.h	2018-01-09 16:48:33.000000000 +0000
 @@ -200,7 +200,7 @@
- #define __NR_clock_gettime	(__NR_timer_create+6)
- #define __NR_clock_getres	(__NR_timer_create+7)
- #define __NR_clock_nanosleep	(__NR_timer_create+8)
+ #define __NR_clock_gettime	260
+ #define __NR_clock_getres	261
+ #define __NR_clock_nanosleep	262
 -/* Number 263 is reserved for vserver */
 +#define __NR_vserver		263
  #define __NR_statfs64		265
  #define __NR_fstatfs64		266
  #define __NR_remap_file_pages	267
-diff -NurpP --minimal linux-3.18.5/arch/s390/kernel/ptrace.c linux-3.18.5-vs2.3.7.3/arch/s390/kernel/ptrace.c
---- linux-3.18.5/arch/s390/kernel/ptrace.c	2015-01-17 02:39:41.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/s390/kernel/ptrace.c	2015-01-19 10:57:46.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/arch/s390/kernel/ptrace.c linux-4.4.110-vs2.3.9/arch/s390/kernel/ptrace.c
+--- linux-4.4.110/arch/s390/kernel/ptrace.c	2018-01-09 16:34:32.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/s390/kernel/ptrace.c	2018-01-09 16:36:21.000000000 +0000
 @@ -21,6 +21,7 @@
  #include <linux/tracehook.h>
  #include <linux/seccomp.h>
@@ -565,22 +565,22 @@ diff -NurpP --minimal linux-3.18.5/arch/s390/kernel/ptrace.c linux-3.18.5-vs2.3.
  #include <trace/syscall.h>
  #include <asm/segment.h>
  #include <asm/page.h>
-diff -NurpP --minimal linux-3.18.5/arch/s390/kernel/syscalls.S linux-3.18.5-vs2.3.7.3/arch/s390/kernel/syscalls.S
---- linux-3.18.5/arch/s390/kernel/syscalls.S	2015-01-17 02:39:41.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/s390/kernel/syscalls.S	2015-01-19 11:00:51.000000000 +0000
-@@ -271,7 +271,7 @@ SYSCALL(sys_clock_settime,sys_clock_sett
- SYSCALL(sys_clock_gettime,sys_clock_gettime,compat_sys_clock_gettime)	/* 260 */
- SYSCALL(sys_clock_getres,sys_clock_getres,compat_sys_clock_getres)
- SYSCALL(sys_clock_nanosleep,sys_clock_nanosleep,compat_sys_clock_nanosleep)
--NI_SYSCALL							/* reserved for vserver */
+diff -NurpP --minimal linux-4.4.110/arch/s390/kernel/syscalls.S linux-4.4.110-vs2.3.9/arch/s390/kernel/syscalls.S
+--- linux-4.4.110/arch/s390/kernel/syscalls.S	2018-01-09 16:34:32.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/s390/kernel/syscalls.S	2018-01-09 16:36:21.000000000 +0000
+@@ -271,7 +271,7 @@ SYSCALL(sys_clock_settime,compat_sys_clo
+ SYSCALL(sys_clock_gettime,compat_sys_clock_gettime)	/* 260 */
+ SYSCALL(sys_clock_getres,compat_sys_clock_getres)
+ SYSCALL(sys_clock_nanosleep,compat_sys_clock_nanosleep)
+-NI_SYSCALL						/* reserved for vserver */
 +SYSCALL(sys_vserver,sys_vserver,sys32_vserver)
- SYSCALL(sys_s390_fadvise64_64,sys_ni_syscall,compat_sys_s390_fadvise64_64)
- SYSCALL(sys_statfs64,sys_statfs64,compat_sys_statfs64)
- SYSCALL(sys_fstatfs64,sys_fstatfs64,compat_sys_fstatfs64)
-diff -NurpP --minimal linux-3.18.5/arch/sh/Kconfig linux-3.18.5-vs2.3.7.3/arch/sh/Kconfig
---- linux-3.18.5/arch/sh/Kconfig	2015-01-16 22:18:23.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/sh/Kconfig	2015-01-19 10:57:46.000000000 +0000
-@@ -878,6 +878,8 @@ source "fs/Kconfig"
+ SYSCALL(sys_ni_syscall,compat_sys_s390_fadvise64_64)
+ SYSCALL(sys_statfs64,compat_sys_statfs64)
+ SYSCALL(sys_fstatfs64,compat_sys_fstatfs64)
+diff -NurpP --minimal linux-4.4.110/arch/sh/Kconfig linux-4.4.110-vs2.3.9/arch/sh/Kconfig
+--- linux-4.4.110/arch/sh/Kconfig	2016-07-05 04:11:46.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/sh/Kconfig	2018-01-09 16:36:21.000000000 +0000
+@@ -883,6 +883,8 @@ source "fs/Kconfig"
  
  source "arch/sh/Kconfig.debug"
  
@@ -589,9 +589,9 @@ diff -NurpP --minimal linux-3.18.5/arch/sh/Kconfig linux-3.18.5-vs2.3.7.3/arch/s
  source "security/Kconfig"
  
  source "crypto/Kconfig"
-diff -NurpP --minimal linux-3.18.5/arch/sh/kernel/irq.c linux-3.18.5-vs2.3.7.3/arch/sh/kernel/irq.c
---- linux-3.18.5/arch/sh/kernel/irq.c	2014-06-12 13:01:29.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/sh/kernel/irq.c	2015-01-19 10:57:46.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/arch/sh/kernel/irq.c linux-4.4.110-vs2.3.9/arch/sh/kernel/irq.c
+--- linux-4.4.110/arch/sh/kernel/irq.c	2016-07-05 04:11:46.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/sh/kernel/irq.c	2018-01-09 16:36:21.000000000 +0000
 @@ -14,6 +14,7 @@
  #include <linux/ftrace.h>
  #include <linux/delay.h>
@@ -600,10 +600,10 @@ diff -NurpP --minimal linux-3.18.5/arch/sh/kernel/irq.c linux-3.18.5-vs2.3.7.3/a
  #include <asm/processor.h>
  #include <asm/machvec.h>
  #include <asm/uaccess.h>
-diff -NurpP --minimal linux-3.18.5/arch/sparc/Kconfig linux-3.18.5-vs2.3.7.3/arch/sparc/Kconfig
---- linux-3.18.5/arch/sparc/Kconfig	2015-01-17 02:39:41.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/sparc/Kconfig	2015-01-19 10:57:46.000000000 +0000
-@@ -557,6 +557,8 @@ source "fs/Kconfig"
+diff -NurpP --minimal linux-4.4.110/arch/sparc/Kconfig linux-4.4.110-vs2.3.9/arch/sparc/Kconfig
+--- linux-4.4.110/arch/sparc/Kconfig	2018-01-09 16:34:32.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/sparc/Kconfig	2018-01-09 16:36:21.000000000 +0000
+@@ -561,6 +561,8 @@ source "fs/Kconfig"
  
  source "arch/sparc/Kconfig.debug"
  
@@ -612,9 +612,9 @@ diff -NurpP --minimal linux-3.18.5/arch/sparc/Kconfig linux-3.18.5-vs2.3.7.3/arc
  source "security/Kconfig"
  
  source "crypto/Kconfig"
-diff -NurpP --minimal linux-3.18.5/arch/sparc/include/uapi/asm/unistd.h linux-3.18.5-vs2.3.7.3/arch/sparc/include/uapi/asm/unistd.h
---- linux-3.18.5/arch/sparc/include/uapi/asm/unistd.h	2015-01-17 02:39:41.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/sparc/include/uapi/asm/unistd.h	2015-01-19 10:57:46.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/arch/sparc/include/uapi/asm/unistd.h linux-4.4.110-vs2.3.9/arch/sparc/include/uapi/asm/unistd.h
+--- linux-4.4.110/arch/sparc/include/uapi/asm/unistd.h	2016-07-05 04:14:33.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/sparc/include/uapi/asm/unistd.h	2018-01-09 16:36:21.000000000 +0000
 @@ -332,7 +332,7 @@
  #define __NR_timer_getoverrun	264
  #define __NR_timer_delete	265
@@ -624,9 +624,9 @@ diff -NurpP --minimal linux-3.18.5/arch/sparc/include/uapi/asm/unistd.h linux-3.
  #define __NR_io_setup		268
  #define __NR_io_destroy		269
  #define __NR_io_submit		270
-diff -NurpP --minimal linux-3.18.5/arch/sparc/kernel/systbls_32.S linux-3.18.5-vs2.3.7.3/arch/sparc/kernel/systbls_32.S
---- linux-3.18.5/arch/sparc/kernel/systbls_32.S	2015-01-17 02:39:41.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/sparc/kernel/systbls_32.S	2015-01-19 10:57:46.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/arch/sparc/kernel/systbls_32.S linux-4.4.110-vs2.3.9/arch/sparc/kernel/systbls_32.S
+--- linux-4.4.110/arch/sparc/kernel/systbls_32.S	2016-07-05 04:14:33.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/sparc/kernel/systbls_32.S	2018-01-09 16:36:21.000000000 +0000
 @@ -70,7 +70,7 @@ sys_call_table:
  /*250*/	.long sys_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_ni_syscall
  /*255*/	.long sys_sync_file_range, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep
@@ -636,9 +636,9 @@ diff -NurpP --minimal linux-3.18.5/arch/sparc/kernel/systbls_32.S linux-3.18.5-v
  /*270*/	.long sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink
  /*275*/	.long sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid
  /*280*/	.long sys_tee, sys_add_key, sys_request_key, sys_keyctl, sys_openat
-diff -NurpP --minimal linux-3.18.5/arch/sparc/kernel/systbls_64.S linux-3.18.5-vs2.3.7.3/arch/sparc/kernel/systbls_64.S
---- linux-3.18.5/arch/sparc/kernel/systbls_64.S	2015-01-17 02:39:41.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/sparc/kernel/systbls_64.S	2015-01-19 10:57:46.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/arch/sparc/kernel/systbls_64.S linux-4.4.110-vs2.3.9/arch/sparc/kernel/systbls_64.S
+--- linux-4.4.110/arch/sparc/kernel/systbls_64.S	2016-07-05 04:14:33.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/sparc/kernel/systbls_64.S	2018-01-09 16:36:21.000000000 +0000
 @@ -71,7 +71,7 @@ sys_call_table32:
  /*250*/	.word sys_mremap, compat_sys_sysctl, sys_getsid, sys_fdatasync, sys_nis_syscall
  	.word sys32_sync_file_range, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep
@@ -648,7 +648,7 @@ diff -NurpP --minimal linux-3.18.5/arch/sparc/kernel/systbls_64.S linux-3.18.5-v
  /*270*/	.word sys32_io_submit, sys_io_cancel, compat_sys_io_getevents, sys32_mq_open, sys_mq_unlink
  	.word compat_sys_mq_timedsend, compat_sys_mq_timedreceive, compat_sys_mq_notify, compat_sys_mq_getsetattr, compat_sys_waitid
  /*280*/	.word sys_tee, sys_add_key, sys_request_key, compat_sys_keyctl, compat_sys_openat
-@@ -150,7 +150,7 @@ sys_call_table:
+@@ -152,7 +152,7 @@ sys_call_table:
  /*250*/	.word sys_64_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_nis_syscall
  	.word sys_sync_file_range, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep
  /*260*/	.word sys_sched_getaffinity, sys_sched_setaffinity, sys_timer_settime, sys_timer_gettime, sys_timer_getoverrun
@@ -657,9 +657,9 @@ diff -NurpP --minimal linux-3.18.5/arch/sparc/kernel/systbls_64.S linux-3.18.5-v
  /*270*/	.word sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink
  	.word sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid
  /*280*/	.word sys_tee, sys_add_key, sys_request_key, sys_keyctl, sys_openat
-diff -NurpP --minimal linux-3.18.5/arch/um/Kconfig.rest linux-3.18.5-vs2.3.7.3/arch/um/Kconfig.rest
---- linux-3.18.5/arch/um/Kconfig.rest	2012-12-11 03:30:57.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/um/Kconfig.rest	2015-01-19 10:57:46.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/arch/um/Kconfig.rest linux-4.4.110-vs2.3.9/arch/um/Kconfig.rest
+--- linux-4.4.110/arch/um/Kconfig.rest	2015-04-12 22:12:50.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/um/Kconfig.rest	2018-01-09 16:36:21.000000000 +0000
 @@ -12,6 +12,8 @@ source "arch/um/Kconfig.net"
  
  source "fs/Kconfig"
@@ -669,10 +669,10 @@ diff -NurpP --minimal linux-3.18.5/arch/um/Kconfig.rest linux-3.18.5-vs2.3.7.3/a
  source "security/Kconfig"
  
  source "crypto/Kconfig"
-diff -NurpP --minimal linux-3.18.5/arch/x86/Kconfig linux-3.18.5-vs2.3.7.3/arch/x86/Kconfig
---- linux-3.18.5/arch/x86/Kconfig	2015-02-05 18:02:39.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/x86/Kconfig	2015-02-05 18:08:00.000000000 +0000
-@@ -2506,6 +2506,8 @@ source "fs/Kconfig"
+diff -NurpP --minimal linux-4.4.110/arch/x86/Kconfig linux-4.4.110-vs2.3.9/arch/x86/Kconfig
+--- linux-4.4.110/arch/x86/Kconfig	2018-01-09 16:34:33.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/x86/Kconfig	2018-01-09 16:36:21.000000000 +0000
+@@ -2672,6 +2672,8 @@ source "fs/Kconfig"
  
  source "arch/x86/Kconfig.debug"
  
@@ -681,9 +681,9 @@ diff -NurpP --minimal linux-3.18.5/arch/x86/Kconfig linux-3.18.5-vs2.3.7.3/arch/
  source "security/Kconfig"
  
  source "crypto/Kconfig"
-diff -NurpP --minimal linux-3.18.5/arch/x86/syscalls/syscall_32.tbl linux-3.18.5-vs2.3.7.3/arch/x86/syscalls/syscall_32.tbl
---- linux-3.18.5/arch/x86/syscalls/syscall_32.tbl	2015-01-17 02:39:43.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/x86/syscalls/syscall_32.tbl	2015-01-19 10:57:46.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/arch/x86/entry/syscalls/syscall_32.tbl linux-4.4.110-vs2.3.9/arch/x86/entry/syscalls/syscall_32.tbl
+--- linux-4.4.110/arch/x86/entry/syscalls/syscall_32.tbl	2018-01-09 16:34:33.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/x86/entry/syscalls/syscall_32.tbl	2018-01-10 01:51:14.000000000 +0000
 @@ -279,7 +279,7 @@
  270	i386	tgkill			sys_tgkill
  271	i386	utimes			sys_utimes			compat_sys_utimes
@@ -693,9 +693,9 @@ diff -NurpP --minimal linux-3.18.5/arch/x86/syscalls/syscall_32.tbl linux-3.18.5
  274	i386	mbind			sys_mbind
  275	i386	get_mempolicy		sys_get_mempolicy		compat_sys_get_mempolicy
  276	i386	set_mempolicy		sys_set_mempolicy
-diff -NurpP --minimal linux-3.18.5/arch/x86/syscalls/syscall_64.tbl linux-3.18.5-vs2.3.7.3/arch/x86/syscalls/syscall_64.tbl
---- linux-3.18.5/arch/x86/syscalls/syscall_64.tbl	2015-01-17 02:39:43.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/arch/x86/syscalls/syscall_64.tbl	2015-01-19 10:57:46.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/arch/x86/entry/syscalls/syscall_64.tbl linux-4.4.110-vs2.3.9/arch/x86/entry/syscalls/syscall_64.tbl
+--- linux-4.4.110/arch/x86/entry/syscalls/syscall_64.tbl	2016-07-05 04:14:33.000000000 +0000
++++ linux-4.4.110-vs2.3.9/arch/x86/entry/syscalls/syscall_64.tbl	2018-01-10 01:51:32.000000000 +0000
 @@ -242,7 +242,7 @@
  233	common	epoll_ctl		sys_epoll_ctl
  234	common	tgkill			sys_tgkill
@@ -705,9 +705,9 @@ diff -NurpP --minimal linux-3.18.5/arch/x86/syscalls/syscall_64.tbl linux-3.18.5
  237	common	mbind			sys_mbind
  238	common	set_mempolicy		sys_set_mempolicy
  239	common	get_mempolicy		sys_get_mempolicy
-diff -NurpP --minimal linux-3.18.5/block/ioprio.c linux-3.18.5-vs2.3.7.3/block/ioprio.c
---- linux-3.18.5/block/ioprio.c	2015-01-17 02:39:43.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/block/ioprio.c	2015-01-19 13:00:07.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/block/ioprio.c linux-4.4.110-vs2.3.9/block/ioprio.c
+--- linux-4.4.110/block/ioprio.c	2018-01-09 16:34:34.000000000 +0000
++++ linux-4.4.110-vs2.3.9/block/ioprio.c	2018-01-09 16:36:23.000000000 +0000
 @@ -28,6 +28,7 @@
  #include <linux/syscalls.h>
  #include <linux/security.h>
@@ -725,7 +725,7 @@ diff -NurpP --minimal linux-3.18.5/block/ioprio.c linux-3.18.5-vs2.3.7.3/block/i
  				ret = set_task_ioprio(p, ioprio);
  				if (ret)
  					break;
-@@ -200,6 +203,8 @@ SYSCALL_DEFINE2(ioprio_get, int, which,
+@@ -203,6 +206,8 @@ SYSCALL_DEFINE2(ioprio_get, int, which,
  			else
  				pgrp = find_vpid(who);
  			do_each_pid_thread(pgrp, PIDTYPE_PGID, p) {
@@ -734,9 +734,9 @@ diff -NurpP --minimal linux-3.18.5/block/ioprio.c linux-3.18.5-vs2.3.7.3/block/i
  				tmpio = get_task_ioprio(p);
  				if (tmpio < 0)
  					continue;
-diff -NurpP --minimal linux-3.18.5/drivers/block/Kconfig linux-3.18.5-vs2.3.7.3/drivers/block/Kconfig
---- linux-3.18.5/drivers/block/Kconfig	2014-06-12 11:33:19.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/drivers/block/Kconfig	2015-01-19 10:57:46.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/drivers/block/Kconfig linux-4.4.110-vs2.3.9/drivers/block/Kconfig
+--- linux-4.4.110/drivers/block/Kconfig	2016-07-05 04:14:35.000000000 +0000
++++ linux-4.4.110-vs2.3.9/drivers/block/Kconfig	2018-01-09 16:36:23.000000000 +0000
 @@ -283,6 +283,13 @@ config BLK_DEV_CRYPTOLOOP
  
  source "drivers/block/drbd/Kconfig"
@@ -751,10 +751,10 @@ diff -NurpP --minimal linux-3.18.5/drivers/block/Kconfig linux-3.18.5-vs2.3.7.3/
  config BLK_DEV_NBD
  	tristate "Network block device support"
  	depends on NET
-diff -NurpP --minimal linux-3.18.5/drivers/block/Makefile linux-3.18.5-vs2.3.7.3/drivers/block/Makefile
---- linux-3.18.5/drivers/block/Makefile	2014-06-12 11:33:19.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/drivers/block/Makefile	2015-01-19 10:57:46.000000000 +0000
-@@ -33,6 +33,7 @@ obj-$(CONFIG_VIRTIO_BLK)	+= virtio_blk.o
+diff -NurpP --minimal linux-4.4.110/drivers/block/Makefile linux-4.4.110-vs2.3.9/drivers/block/Makefile
+--- linux-4.4.110/drivers/block/Makefile	2016-07-05 04:14:35.000000000 +0000
++++ linux-4.4.110-vs2.3.9/drivers/block/Makefile	2018-01-09 16:36:23.000000000 +0000
+@@ -32,6 +32,7 @@ obj-$(CONFIG_VIRTIO_BLK)	+= virtio_blk.o
  
  obj-$(CONFIG_BLK_DEV_SX8)	+= sx8.o
  obj-$(CONFIG_BLK_DEV_HD)	+= hd.o
@@ -762,34 +762,34 @@ diff -NurpP --minimal linux-3.18.5/drivers/block/Makefile linux-3.18.5-vs2.3.7.3
  
  obj-$(CONFIG_XEN_BLKDEV_FRONTEND)	+= xen-blkfront.o
  obj-$(CONFIG_XEN_BLKDEV_BACKEND)	+= xen-blkback/
-diff -NurpP --minimal linux-3.18.5/drivers/block/loop.c linux-3.18.5-vs2.3.7.3/drivers/block/loop.c
---- linux-3.18.5/drivers/block/loop.c	2014-09-03 13:18:40.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/drivers/block/loop.c	2015-01-19 10:57:46.000000000 +0000
-@@ -75,6 +75,7 @@
- #include <linux/sysfs.h>
+diff -NurpP --minimal linux-4.4.110/drivers/block/loop.c linux-4.4.110-vs2.3.9/drivers/block/loop.c
+--- linux-4.4.110/drivers/block/loop.c	2018-01-09 16:34:35.000000000 +0000
++++ linux-4.4.110-vs2.3.9/drivers/block/loop.c	2018-01-09 23:00:25.000000000 +0000
+@@ -76,6 +76,7 @@
  #include <linux/miscdevice.h>
  #include <linux/falloc.h>
+ #include <linux/uio.h>
 +#include <linux/vs_context.h>
  #include "loop.h"
  
  #include <asm/uaccess.h>
-@@ -885,6 +886,7 @@ static int loop_set_fd(struct loop_devic
+@@ -935,6 +936,7 @@ static int loop_set_fd(struct loop_devic
  	lo->lo_blocksize = lo_blocksize;
  	lo->lo_device = bdev;
  	lo->lo_flags = lo_flags;
 +	lo->lo_xid = vx_current_xid();
  	lo->lo_backing_file = file;
- 	lo->transfer = transfer_none;
+ 	lo->transfer = NULL;
  	lo->ioctl = NULL;
-@@ -1029,6 +1031,7 @@ static int loop_clr_fd(struct loop_devic
+@@ -1055,6 +1057,7 @@ static int loop_clr_fd(struct loop_devic
+ 	lo->lo_offset = 0;
  	lo->lo_sizelimit = 0;
  	lo->lo_encrypt_key_size = 0;
- 	lo->lo_thread = NULL;
 +	lo->lo_xid = 0;
  	memset(lo->lo_encrypt_key, 0, LO_KEY_SIZE);
  	memset(lo->lo_crypt_name, 0, LO_NAME_SIZE);
  	memset(lo->lo_file_name, 0, LO_NAME_SIZE);
-@@ -1072,7 +1075,7 @@ loop_set_status(struct loop_device *lo,
+@@ -1101,7 +1104,7 @@ loop_set_status(struct loop_device *lo,
  
  	if (lo->lo_encrypt_key_size &&
  	    !uid_eq(lo->lo_key_owner, uid) &&
@@ -798,7 +798,7 @@ diff -NurpP --minimal linux-3.18.5/drivers/block/loop.c linux-3.18.5-vs2.3.7.3/d
  		return -EPERM;
  	if (lo->lo_state != Lo_bound)
  		return -ENXIO;
-@@ -1162,7 +1165,8 @@ loop_get_status(struct loop_device *lo,
+@@ -1202,7 +1205,8 @@ loop_get_status(struct loop_device *lo,
  	memcpy(info->lo_crypt_name, lo->lo_crypt_name, LO_NAME_SIZE);
  	info->lo_encrypt_type =
  		lo->lo_encryption ? lo->lo_encryption->number : 0;
@@ -808,7 +808,7 @@ diff -NurpP --minimal linux-3.18.5/drivers/block/loop.c linux-3.18.5-vs2.3.7.3/d
  		info->lo_encrypt_key_size = lo->lo_encrypt_key_size;
  		memcpy(info->lo_encrypt_key, lo->lo_encrypt_key,
  		       lo->lo_encrypt_key_size);
-@@ -1504,6 +1508,11 @@ static int lo_open(struct block_device *
+@@ -1563,6 +1567,11 @@ static int lo_open(struct block_device *
  		goto out;
  	}
  
@@ -817,13 +817,13 @@ diff -NurpP --minimal linux-3.18.5/drivers/block/loop.c linux-3.18.5-vs2.3.7.3/d
 +		goto out;
 +	}
 +
- 	mutex_lock(&lo->lo_ctl_mutex);
- 	lo->lo_refcnt++;
- 	mutex_unlock(&lo->lo_ctl_mutex);
-diff -NurpP --minimal linux-3.18.5/drivers/block/loop.h linux-3.18.5-vs2.3.7.3/drivers/block/loop.h
---- linux-3.18.5/drivers/block/loop.h	2013-11-25 15:44:28.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/drivers/block/loop.h	2015-01-19 10:57:46.000000000 +0000
-@@ -41,6 +41,7 @@ struct loop_device {
+ 	atomic_inc(&lo->lo_refcnt);
+ out:
+ 	mutex_unlock(&loop_index_mutex);
+diff -NurpP --minimal linux-4.4.110/drivers/block/loop.h linux-4.4.110-vs2.3.9/drivers/block/loop.h
+--- linux-4.4.110/drivers/block/loop.h	2016-07-05 04:14:35.000000000 +0000
++++ linux-4.4.110-vs2.3.9/drivers/block/loop.h	2018-01-09 16:36:23.000000000 +0000
+@@ -43,6 +43,7 @@ struct loop_device {
  	struct loop_func_table *lo_encryption;
  	__u32           lo_init[2];
  	kuid_t		lo_key_owner;	/* Who set the key */
@@ -831,19 +831,19 @@ diff -NurpP --minimal linux-3.18.5/drivers/block/loop.h linux-3.18.5-vs2.3.7.3/d
  	int		(*ioctl)(struct loop_device *, int cmd, 
  				 unsigned long arg); 
  
-diff -NurpP --minimal linux-3.18.5/drivers/block/vroot.c linux-3.18.5-vs2.3.7.3/drivers/block/vroot.c
---- linux-3.18.5/drivers/block/vroot.c	1970-01-01 00:00:00.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/drivers/block/vroot.c	2015-01-19 10:57:46.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/drivers/block/vroot.c linux-4.4.110-vs2.3.9/drivers/block/vroot.c
+--- linux-4.4.110/drivers/block/vroot.c	1970-01-01 00:00:00.000000000 +0000
++++ linux-4.4.110-vs2.3.9/drivers/block/vroot.c	2018-01-09 16:36:23.000000000 +0000
 @@ -0,0 +1,290 @@
 +/*
 + *  linux/drivers/block/vroot.c
 + *
-+ *  written by Herbert P�tzl, 9/11/2002
-+ *  ported to 2.6.10 by Herbert P�tzl, 30/12/2004
++ *  written by Herbert P?tzl, 9/11/2002
++ *  ported to 2.6.10 by Herbert P?tzl, 30/12/2004
 + *
 + *  based on the loop.c code by Theodore Ts'o.
 + *
-+ * Copyright (C) 2002-2007 by Herbert P�tzl.
++ * Copyright (C) 2002-2007 by Herbert P?tzl.
 + * Redistribution of this file is permitted under the
 + * GNU General Public License.
 + *
@@ -886,7 +886,7 @@ diff -NurpP --minimal linux-3.18.5/drivers/block/vroot.c linux-3.18.5-vs2.3.7.3/
 +		goto out;
 +
 +	error = -EINVAL;
-+	inode = file->f_dentry->d_inode;
++	inode = file->f_path.dentry->d_inode;
 +
 +
 +	if (S_ISBLK(inode->i_mode)) {
@@ -1020,7 +1020,7 @@ diff -NurpP --minimal linux-3.18.5/drivers/block/vroot.c linux-3.18.5-vs2.3.7.3/
 +MODULE_LICENSE("GPL");
 +MODULE_ALIAS_BLOCKDEV_MAJOR(VROOT_MAJOR);
 +
-+MODULE_AUTHOR ("Herbert P�tzl");
++MODULE_AUTHOR ("Herbert P?tzl");
 +MODULE_DESCRIPTION ("Virtual Root Device Mapper");
 +
 +
@@ -1125,21 +1125,21 @@ diff -NurpP --minimal linux-3.18.5/drivers/block/vroot.c linux-3.18.5-vs2.3.7.3/
 +
 +#endif
 +
-diff -NurpP --minimal linux-3.18.5/drivers/infiniband/core/addr.c linux-3.18.5-vs2.3.7.3/drivers/infiniband/core/addr.c
---- linux-3.18.5/drivers/infiniband/core/addr.c	2014-06-12 11:33:41.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/drivers/infiniband/core/addr.c	2015-01-19 10:57:46.000000000 +0000
-@@ -284,7 +284,7 @@ static int addr6_resolve(struct sockaddr
+diff -NurpP --minimal linux-4.4.110/drivers/infiniband/core/addr.c linux-4.4.110-vs2.3.9/drivers/infiniband/core/addr.c
+--- linux-4.4.110/drivers/infiniband/core/addr.c	2018-01-09 16:34:44.000000000 +0000
++++ linux-4.4.110-vs2.3.9/drivers/infiniband/core/addr.c	2018-01-09 16:49:06.000000000 +0000
+@@ -283,7 +283,7 @@ static int addr6_resolve(struct sockaddr
  
  	if (ipv6_addr_any(&fl6.saddr)) {
- 		ret = ipv6_dev_get_saddr(&init_net, ip6_dst_idev(dst)->dev,
+ 		ret = ipv6_dev_get_saddr(addr->net, ip6_dst_idev(dst)->dev,
 -					 &fl6.daddr, 0, &fl6.saddr);
 +					 &fl6.daddr, 0, &fl6.saddr, NULL);
  		if (ret)
  			goto put;
  
-diff -NurpP --minimal linux-3.18.5/drivers/md/dm-ioctl.c linux-3.18.5-vs2.3.7.3/drivers/md/dm-ioctl.c
---- linux-3.18.5/drivers/md/dm-ioctl.c	2015-01-17 02:39:51.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/drivers/md/dm-ioctl.c	2015-01-19 10:57:46.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/drivers/md/dm-ioctl.c linux-4.4.110-vs2.3.9/drivers/md/dm-ioctl.c
+--- linux-4.4.110/drivers/md/dm-ioctl.c	2018-01-09 16:34:46.000000000 +0000
++++ linux-4.4.110-vs2.3.9/drivers/md/dm-ioctl.c	2018-01-09 16:36:23.000000000 +0000
 @@ -16,6 +16,7 @@
  #include <linux/dm-ioctl.h>
  #include <linux/hdreg.h>
@@ -1214,7 +1214,7 @@ diff -NurpP --minimal linux-3.18.5/drivers/md/dm-ioctl.c linux-3.18.5-vs2.3.7.3/
  			if (old_nl)
  				old_nl->next = (uint32_t) ((void *) nl -
  							   (void *) old_nl);
-@@ -1797,8 +1809,8 @@ static int ctl_ioctl(uint command, struc
+@@ -1801,8 +1813,8 @@ static int ctl_ioctl(uint command, struc
  	size_t input_param_size;
  	struct dm_ioctl param_kernel;
  
@@ -1225,18 +1225,18 @@ diff -NurpP --minimal linux-3.18.5/drivers/md/dm-ioctl.c linux-3.18.5-vs2.3.7.3/
  		return -EACCES;
  
  	if (_IOC_TYPE(command) != DM_IOCTL)
-diff -NurpP --minimal linux-3.18.5/drivers/md/dm.c linux-3.18.5-vs2.3.7.3/drivers/md/dm.c
---- linux-3.18.5/drivers/md/dm.c	2015-02-05 18:02:42.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/drivers/md/dm.c	2015-01-28 11:48:02.000000000 +0000
-@@ -19,6 +19,7 @@
- #include <linux/idr.h>
- #include <linux/hdreg.h>
- #include <linux/delay.h>
+diff -NurpP --minimal linux-4.4.110/drivers/md/dm.c linux-4.4.110-vs2.3.9/drivers/md/dm.c
+--- linux-4.4.110/drivers/md/dm.c	2018-01-09 16:34:46.000000000 +0000
++++ linux-4.4.110-vs2.3.9/drivers/md/dm.c	2018-01-09 16:49:30.000000000 +0000
+@@ -25,6 +25,7 @@
+ #include <linux/elevator.h> /* for rq_end_sector() */
+ #include <linux/blk-mq.h>
+ #include <linux/pr.h>
 +#include <linux/vs_base.h>
  
  #include <trace/events/block.h>
  
-@@ -134,6 +135,7 @@ struct mapped_device {
+@@ -144,6 +145,7 @@ struct mapped_device {
  	struct mutex suspend_lock;
  	atomic_t holders;
  	atomic_t open_count;
@@ -1244,7 +1244,7 @@ diff -NurpP --minimal linux-3.18.5/drivers/md/dm.c linux-3.18.5-vs2.3.7.3/driver
  
  	/*
  	 * The current mapping.
-@@ -397,6 +399,7 @@ int dm_deleting_md(struct mapped_device
+@@ -445,6 +447,7 @@ int dm_deleting_md(struct mapped_device
  static int dm_blk_open(struct block_device *bdev, fmode_t mode)
  {
  	struct mapped_device *md;
@@ -1252,7 +1252,7 @@ diff -NurpP --minimal linux-3.18.5/drivers/md/dm.c linux-3.18.5-vs2.3.7.3/driver
  
  	spin_lock(&_minor_lock);
  
-@@ -405,18 +408,19 @@ static int dm_blk_open(struct block_devi
+@@ -453,17 +456,19 @@ static int dm_blk_open(struct block_devi
  		goto out;
  
  	if (test_bit(DMF_FREEING, &md->flags) ||
@@ -1268,7 +1268,6 @@ diff -NurpP --minimal linux-3.18.5/drivers/md/dm.c linux-3.18.5-vs2.3.7.3/driver
  
  	dm_get(md);
  	atomic_inc(&md->open_count);
--
 +	ret = 0;
  out:
  	spin_unlock(&_minor_lock);
@@ -1278,7 +1277,7 @@ diff -NurpP --minimal linux-3.18.5/drivers/md/dm.c linux-3.18.5-vs2.3.7.3/driver
  }
  
  static void dm_blk_close(struct gendisk *disk, fmode_t mode)
-@@ -819,6 +823,14 @@ int dm_set_geometry(struct mapped_device
+@@ -909,6 +914,14 @@ int dm_set_geometry(struct mapped_device
  	return 0;
  }
  
@@ -1293,18 +1292,18 @@ diff -NurpP --minimal linux-3.18.5/drivers/md/dm.c linux-3.18.5-vs2.3.7.3/driver
  /*-----------------------------------------------------------------
   * CRUD START:
   *   A more elegant soln is in the works that uses the queue
-@@ -2077,6 +2089,7 @@ static struct mapped_device *alloc_dev(i
+@@ -2380,6 +2393,7 @@ static struct mapped_device *alloc_dev(i
  	INIT_LIST_HEAD(&md->table_devices);
  	spin_lock_init(&md->uevent_lock);
  
 +	md->xid = vx_current_xid();
  	md->queue = blk_alloc_queue(GFP_KERNEL);
  	if (!md->queue)
- 		goto bad_queue;
-diff -NurpP --minimal linux-3.18.5/drivers/md/dm.h linux-3.18.5-vs2.3.7.3/drivers/md/dm.h
---- linux-3.18.5/drivers/md/dm.h	2015-01-17 02:39:51.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/drivers/md/dm.h	2015-01-19 10:57:46.000000000 +0000
-@@ -50,6 +50,8 @@ struct dm_dev_internal {
+ 		goto bad;
+diff -NurpP --minimal linux-4.4.110/drivers/md/dm.h linux-4.4.110-vs2.3.9/drivers/md/dm.h
+--- linux-4.4.110/drivers/md/dm.h	2016-07-05 04:12:06.000000000 +0000
++++ linux-4.4.110-vs2.3.9/drivers/md/dm.h	2018-01-09 16:36:24.000000000 +0000
+@@ -52,6 +52,8 @@ struct dm_dev_internal {
  struct dm_table;
  struct dm_md_mempools;
  
@@ -1313,18 +1312,18 @@ diff -NurpP --minimal linux-3.18.5/drivers/md/dm.h linux-3.18.5-vs2.3.7.3/driver
  /*-----------------------------------------------------------------
   * Internal table functions.
   *---------------------------------------------------------------*/
-diff -NurpP --minimal linux-3.18.5/drivers/net/tun.c linux-3.18.5-vs2.3.7.3/drivers/net/tun.c
---- linux-3.18.5/drivers/net/tun.c	2015-01-17 02:40:00.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/drivers/net/tun.c	2015-01-19 10:57:46.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/drivers/net/tun.c linux-4.4.110-vs2.3.9/drivers/net/tun.c
+--- linux-4.4.110/drivers/net/tun.c	2018-01-09 16:34:53.000000000 +0000
++++ linux-4.4.110-vs2.3.9/drivers/net/tun.c	2018-01-09 16:36:24.000000000 +0000
 @@ -65,6 +65,7 @@
  #include <linux/nsproxy.h>
  #include <linux/virtio_net.h>
  #include <linux/rcupdate.h>
 +#include <linux/vs_network.h>
- #include <net/ipv6.h>
  #include <net/net_namespace.h>
  #include <net/netns/generic.h>
-@@ -171,6 +172,7 @@ struct tun_struct {
+ #include <net/rtnetlink.h>
+@@ -181,6 +182,7 @@ struct tun_struct {
  	unsigned int 		flags;
  	kuid_t			owner;
  	kgid_t			group;
@@ -1332,7 +1331,7 @@ diff -NurpP --minimal linux-3.18.5/drivers/net/tun.c linux-3.18.5-vs2.3.7.3/driv
  
  	struct net_device	*dev;
  	netdev_features_t	set_features;
-@@ -404,6 +406,7 @@ static inline bool tun_not_capable(struc
+@@ -475,6 +477,7 @@ static inline bool tun_not_capable(struc
  	return ((uid_valid(tun->owner) && !uid_eq(cred->euid, tun->owner)) ||
  		  (gid_valid(tun->group) && !in_egroup_p(tun->group))) &&
  		!ns_capable(net->user_ns, CAP_NET_ADMIN);
@@ -1340,7 +1339,7 @@ diff -NurpP --minimal linux-3.18.5/drivers/net/tun.c linux-3.18.5-vs2.3.7.3/driv
  }
  
  static void tun_set_real_num_queues(struct tun_struct *tun)
-@@ -1413,6 +1416,7 @@ static void tun_setup(struct net_device
+@@ -1463,6 +1466,7 @@ static void tun_setup(struct net_device
  
  	tun->owner = INVALID_UID;
  	tun->group = INVALID_GID;
@@ -1348,7 +1347,7 @@ diff -NurpP --minimal linux-3.18.5/drivers/net/tun.c linux-3.18.5-vs2.3.7.3/driv
  
  	dev->ethtool_ops = &tun_ethtool_ops;
  	dev->destructor = tun_free_netdev;
-@@ -1629,7 +1633,7 @@ static int tun_set_iff(struct net *net,
+@@ -1657,7 +1661,7 @@ static int tun_set_iff(struct net *net,
  		int queues = ifr->ifr_flags & IFF_MULTI_QUEUE ?
  			     MAX_TAP_QUEUES : 1;
  
@@ -1357,7 +1356,7 @@ diff -NurpP --minimal linux-3.18.5/drivers/net/tun.c linux-3.18.5-vs2.3.7.3/driv
  			return -EPERM;
  		err = security_tun_dev_create();
  		if (err < 0)
-@@ -1996,6 +2000,16 @@ static long __tun_chr_ioctl(struct file
+@@ -2010,6 +2014,16 @@ static long __tun_chr_ioctl(struct file
  			  from_kgid(&init_user_ns, tun->group));
  		break;
  
@@ -1374,10 +1373,10 @@ diff -NurpP --minimal linux-3.18.5/drivers/net/tun.c linux-3.18.5-vs2.3.7.3/driv
  	case TUNSETLINK:
  		/* Only allow setting the type when the interface is down */
  		if (tun->dev->flags & IFF_UP) {
-diff -NurpP --minimal linux-3.18.5/drivers/scsi/cxgbi/libcxgbi.c linux-3.18.5-vs2.3.7.3/drivers/scsi/cxgbi/libcxgbi.c
---- linux-3.18.5/drivers/scsi/cxgbi/libcxgbi.c	2015-01-17 02:40:05.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/drivers/scsi/cxgbi/libcxgbi.c	2015-02-06 01:59:47.000000000 +0000
-@@ -764,7 +764,8 @@ static struct cxgbi_sock *cxgbi_check_ro
+diff -NurpP --minimal linux-4.4.110/drivers/scsi/cxgbi/libcxgbi.c linux-4.4.110-vs2.3.9/drivers/scsi/cxgbi/libcxgbi.c
+--- linux-4.4.110/drivers/scsi/cxgbi/libcxgbi.c	2015-10-29 09:21:24.000000000 +0000
++++ linux-4.4.110-vs2.3.9/drivers/scsi/cxgbi/libcxgbi.c	2018-01-09 16:36:24.000000000 +0000
+@@ -768,7 +768,8 @@ static struct cxgbi_sock *cxgbi_check_ro
  		struct inet6_dev *idev = ip6_dst_idev((struct dst_entry *)rt);
  
  		err = ipv6_dev_get_saddr(&init_net, idev ? idev->dev : NULL,
@@ -1387,9 +1386,9 @@ diff -NurpP --minimal linux-3.18.5/drivers/scsi/cxgbi/libcxgbi.c linux-3.18.5-vs
  		if (err) {
  			pr_info("failed to get source address to reach %pI6\n",
  				&daddr6->sin6_addr);
-diff -NurpP --minimal linux-3.18.5/drivers/tty/sysrq.c linux-3.18.5-vs2.3.7.3/drivers/tty/sysrq.c
---- linux-3.18.5/drivers/tty/sysrq.c	2015-01-16 22:19:12.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/drivers/tty/sysrq.c	2015-01-19 11:01:25.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/drivers/tty/sysrq.c linux-4.4.110-vs2.3.9/drivers/tty/sysrq.c
+--- linux-4.4.110/drivers/tty/sysrq.c	2018-01-09 16:35:02.000000000 +0000
++++ linux-4.4.110-vs2.3.9/drivers/tty/sysrq.c	2018-01-09 16:36:24.000000000 +0000
 @@ -47,6 +47,7 @@
  #include <linux/syscalls.h>
  #include <linux/of.h>
@@ -1398,7 +1397,7 @@ diff -NurpP --minimal linux-3.18.5/drivers/tty/sysrq.c linux-3.18.5-vs2.3.7.3/dr
  
  #include <asm/ptrace.h>
  #include <asm/irq_regs.h>
-@@ -408,6 +409,21 @@ static struct sysrq_key_op sysrq_unrt_op
+@@ -421,6 +422,21 @@ static struct sysrq_key_op sysrq_unrt_op
  	.enable_mask	= SYSRQ_ENABLE_RTNICE,
  };
  
@@ -1420,8 +1419,8 @@ diff -NurpP --minimal linux-3.18.5/drivers/tty/sysrq.c linux-3.18.5-vs2.3.7.3/dr
  /* Key Operations table and lock */
  static DEFINE_SPINLOCK(sysrq_key_table_lock);
  
-@@ -463,7 +479,11 @@ static struct sysrq_key_op *sysrq_key_ta
- 	&sysrq_showstate_blocked_op,	/* w */
+@@ -477,7 +493,11 @@ static struct sysrq_key_op *sysrq_key_ta
+ 	/* x: May be registered on mips for TLB dump */
  	/* x: May be registered on ppc/powerpc for xmon */
  	/* x: May be registered on sparc64 for global PMU dump */
 +#ifdef CONFIG_VSERVER_DEBUG
@@ -1432,7 +1431,7 @@ diff -NurpP --minimal linux-3.18.5/drivers/tty/sysrq.c linux-3.18.5-vs2.3.7.3/dr
  	/* y: May be registered on sparc64 for global register dump */
  	NULL,				/* y */
  	&sysrq_ftrace_dump_op,		/* z */
-@@ -478,6 +498,8 @@ static int sysrq_key_table_key2index(int
+@@ -492,6 +512,8 @@ static int sysrq_key_table_key2index(int
  		retval = key - '0';
  	else if ((key >= 'a') && (key <= 'z'))
  		retval = key + 10 - 'a';
@@ -1441,9 +1440,9 @@ diff -NurpP --minimal linux-3.18.5/drivers/tty/sysrq.c linux-3.18.5-vs2.3.7.3/dr
  	else
  		retval = -1;
  	return retval;
-diff -NurpP --minimal linux-3.18.5/drivers/tty/tty_io.c linux-3.18.5-vs2.3.7.3/drivers/tty/tty_io.c
---- linux-3.18.5/drivers/tty/tty_io.c	2015-01-17 02:40:14.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/drivers/tty/tty_io.c	2015-01-19 10:57:46.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/drivers/tty/tty_io.c linux-4.4.110-vs2.3.9/drivers/tty/tty_io.c
+--- linux-4.4.110/drivers/tty/tty_io.c	2018-01-09 16:35:02.000000000 +0000
++++ linux-4.4.110-vs2.3.9/drivers/tty/tty_io.c	2018-01-09 16:36:24.000000000 +0000
 @@ -104,6 +104,7 @@
  
  #include <linux/kmod.h>
@@ -1451,8 +1450,8 @@ diff -NurpP --minimal linux-3.18.5/drivers/tty/tty_io.c linux-3.18.5-vs2.3.7.3/d
 +#include <linux/vs_pid.h>
  
  #undef TTY_DEBUG_HANGUP
- 
-@@ -2237,7 +2238,8 @@ static int tiocsti(struct tty_struct *tt
+ #ifdef TTY_DEBUG_HANGUP
+@@ -2280,7 +2281,8 @@ static int tiocsti(struct tty_struct *tt
  	char ch, mbz = 0;
  	struct tty_ldisc *ld;
  
@@ -1462,7 +1461,7 @@ diff -NurpP --minimal linux-3.18.5/drivers/tty/tty_io.c linux-3.18.5-vs2.3.7.3/d
  		return -EPERM;
  	if (get_user(ch, p))
  		return -EFAULT;
-@@ -2525,6 +2527,7 @@ static int tiocspgrp(struct tty_struct *
+@@ -2593,6 +2595,7 @@ static int tiocspgrp(struct tty_struct *
  		return -ENOTTY;
  	if (get_user(pgrp_nr, p))
  		return -EFAULT;
@@ -1470,9 +1469,9 @@ diff -NurpP --minimal linux-3.18.5/drivers/tty/tty_io.c linux-3.18.5-vs2.3.7.3/d
  	if (pgrp_nr < 0)
  		return -EINVAL;
  	rcu_read_lock();
-diff -NurpP --minimal linux-3.18.5/fs/attr.c linux-3.18.5-vs2.3.7.3/fs/attr.c
---- linux-3.18.5/fs/attr.c	2014-09-03 13:19:35.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/attr.c	2015-01-19 10:57:46.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/attr.c linux-4.4.110-vs2.3.9/fs/attr.c
+--- linux-4.4.110/fs/attr.c	2018-01-09 16:35:04.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/attr.c	2018-01-09 17:27:12.000000000 +0000
 @@ -15,6 +15,9 @@
  #include <linux/security.h>
  #include <linux/evm.h>
@@ -1513,18 +1512,18 @@ diff -NurpP --minimal linux-3.18.5/fs/attr.c linux-3.18.5-vs2.3.7.3/fs/attr.c
  		if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
  			return -EPERM;
  	}
-diff -NurpP --minimal linux-3.18.5/fs/block_dev.c linux-3.18.5-vs2.3.7.3/fs/block_dev.c
---- linux-3.18.5/fs/block_dev.c	2015-01-17 02:40:16.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/block_dev.c	2015-01-19 10:57:46.000000000 +0000
-@@ -28,6 +28,7 @@
+diff -NurpP --minimal linux-4.4.110/fs/block_dev.c linux-4.4.110-vs2.3.9/fs/block_dev.c
+--- linux-4.4.110/fs/block_dev.c	2018-01-09 16:35:04.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/block_dev.c	2018-01-09 17:16:29.000000000 +0000
+@@ -29,6 +29,7 @@
  #include <linux/log2.h>
  #include <linux/cleancache.h>
- #include <linux/aio.h>
+ #include <linux/dax.h>
 +#include <linux/vs_device.h>
  #include <asm/uaccess.h>
  #include "internal.h"
  
-@@ -575,6 +576,7 @@ struct block_device *bdget(dev_t dev)
+@@ -645,6 +646,7 @@ struct block_device *bdget(dev_t dev)
  		bdev->bd_invalidated = 0;
  		inode->i_mode = S_IFBLK;
  		inode->i_rdev = dev;
@@ -1532,7 +1531,7 @@ diff -NurpP --minimal linux-3.18.5/fs/block_dev.c linux-3.18.5-vs2.3.7.3/fs/bloc
  		inode->i_bdev = bdev;
  		inode->i_data.a_ops = &def_blk_aops;
  		mapping_set_gfp_mask(&inode->i_data, GFP_USER);
-@@ -622,6 +624,11 @@ EXPORT_SYMBOL(bdput);
+@@ -691,6 +693,11 @@ EXPORT_SYMBOL(bdput);
  static struct block_device *bd_acquire(struct inode *inode)
  {
  	struct block_device *bdev;
@@ -1544,7 +1543,7 @@ diff -NurpP --minimal linux-3.18.5/fs/block_dev.c linux-3.18.5-vs2.3.7.3/fs/bloc
  
  	spin_lock(&bdev_lock);
  	bdev = inode->i_bdev;
-@@ -632,7 +639,7 @@ static struct block_device *bd_acquire(s
+@@ -701,7 +708,7 @@ static struct block_device *bd_acquire(s
  	}
  	spin_unlock(&bdev_lock);
  
@@ -1553,10 +1552,10 @@ diff -NurpP --minimal linux-3.18.5/fs/block_dev.c linux-3.18.5-vs2.3.7.3/fs/bloc
  	if (bdev) {
  		spin_lock(&bdev_lock);
  		if (!inode->i_bdev) {
-diff -NurpP --minimal linux-3.18.5/fs/btrfs/ctree.h linux-3.18.5-vs2.3.7.3/fs/btrfs/ctree.h
---- linux-3.18.5/fs/btrfs/ctree.h	2015-01-17 02:40:16.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/btrfs/ctree.h	2015-01-19 10:57:46.000000000 +0000
-@@ -728,11 +728,14 @@ struct btrfs_inode_item {
+diff -NurpP --minimal linux-4.4.110/fs/btrfs/ctree.h linux-4.4.110-vs2.3.9/fs/btrfs/ctree.h
+--- linux-4.4.110/fs/btrfs/ctree.h	2018-01-09 16:35:04.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/btrfs/ctree.h	2018-01-09 16:36:24.000000000 +0000
+@@ -731,11 +731,14 @@ struct btrfs_inode_item {
  	/* modification sequence number for NFS */
  	__le64 sequence;
  
@@ -1572,7 +1571,7 @@ diff -NurpP --minimal linux-3.18.5/fs/btrfs/ctree.h linux-3.18.5-vs2.3.7.3/fs/bt
  	struct btrfs_timespec atime;
  	struct btrfs_timespec ctime;
  	struct btrfs_timespec mtime;
-@@ -2098,6 +2101,8 @@ struct btrfs_ioctl_defrag_range_args {
+@@ -2189,6 +2192,8 @@ struct btrfs_ioctl_defrag_range_args {
  #define BTRFS_DEFAULT_COMMIT_INTERVAL	(30)
  #define BTRFS_DEFAULT_MAX_INLINE	(8192)
  
@@ -1581,7 +1580,7 @@ diff -NurpP --minimal linux-3.18.5/fs/btrfs/ctree.h linux-3.18.5-vs2.3.7.3/fs/bt
  #define btrfs_clear_opt(o, opt)		((o) &= ~BTRFS_MOUNT_##opt)
  #define btrfs_set_opt(o, opt)		((o) |= BTRFS_MOUNT_##opt)
  #define btrfs_raw_test_opt(o, opt)	((o) & BTRFS_MOUNT_##opt)
-@@ -2381,6 +2386,7 @@ BTRFS_SETGET_FUNCS(inode_block_group, st
+@@ -2528,6 +2533,7 @@ BTRFS_SETGET_FUNCS(inode_block_group, st
  BTRFS_SETGET_FUNCS(inode_nlink, struct btrfs_inode_item, nlink, 32);
  BTRFS_SETGET_FUNCS(inode_uid, struct btrfs_inode_item, uid, 32);
  BTRFS_SETGET_FUNCS(inode_gid, struct btrfs_inode_item, gid, 32);
@@ -1589,7 +1588,7 @@ diff -NurpP --minimal linux-3.18.5/fs/btrfs/ctree.h linux-3.18.5-vs2.3.7.3/fs/bt
  BTRFS_SETGET_FUNCS(inode_mode, struct btrfs_inode_item, mode, 32);
  BTRFS_SETGET_FUNCS(inode_rdev, struct btrfs_inode_item, rdev, 64);
  BTRFS_SETGET_FUNCS(inode_flags, struct btrfs_inode_item, flags, 64);
-@@ -2453,6 +2459,10 @@ BTRFS_SETGET_FUNCS(extent_flags, struct
+@@ -2575,6 +2581,10 @@ BTRFS_SETGET_FUNCS(extent_flags, struct
  
  BTRFS_SETGET_FUNCS(extent_refs_v0, struct btrfs_extent_item_v0, refs, 32);
  
@@ -1600,7 +1599,7 @@ diff -NurpP --minimal linux-3.18.5/fs/btrfs/ctree.h linux-3.18.5-vs2.3.7.3/fs/bt
  
  BTRFS_SETGET_FUNCS(tree_block_level, struct btrfs_tree_block_info, level, 8);
  
-@@ -3864,6 +3874,7 @@ long btrfs_ioctl(struct file *file, unsi
+@@ -4022,6 +4032,7 @@ long btrfs_ioctl(struct file *file, unsi
  void btrfs_update_iflags(struct inode *inode);
  void btrfs_inherit_iflags(struct inode *inode, struct inode *dir);
  int btrfs_is_empty_uuid(u8 *uuid);
@@ -1608,10 +1607,10 @@ diff -NurpP --minimal linux-3.18.5/fs/btrfs/ctree.h linux-3.18.5-vs2.3.7.3/fs/bt
  int btrfs_defrag_file(struct inode *inode, struct file *file,
  		      struct btrfs_ioctl_defrag_range_args *range,
  		      u64 newer_than, unsigned long max_pages);
-diff -NurpP --minimal linux-3.18.5/fs/btrfs/disk-io.c linux-3.18.5-vs2.3.7.3/fs/btrfs/disk-io.c
---- linux-3.18.5/fs/btrfs/disk-io.c	2015-02-05 18:02:44.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/btrfs/disk-io.c	2015-01-19 10:57:46.000000000 +0000
-@@ -2460,6 +2460,9 @@ int open_ctree(struct super_block *sb,
+diff -NurpP --minimal linux-4.4.110/fs/btrfs/disk-io.c linux-4.4.110-vs2.3.9/fs/btrfs/disk-io.c
+--- linux-4.4.110/fs/btrfs/disk-io.c	2018-01-09 16:35:05.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/btrfs/disk-io.c	2018-01-09 16:36:24.000000000 +0000
+@@ -2736,6 +2736,9 @@ int open_ctree(struct super_block *sb,
  		goto fail_alloc;
  	}
  
@@ -1621,18 +1620,18 @@ diff -NurpP --minimal linux-3.18.5/fs/btrfs/disk-io.c linux-3.18.5-vs2.3.7.3/fs/
  	features = btrfs_super_incompat_flags(disk_super) &
  		~BTRFS_FEATURE_INCOMPAT_SUPP;
  	if (features) {
-diff -NurpP --minimal linux-3.18.5/fs/btrfs/inode.c linux-3.18.5-vs2.3.7.3/fs/btrfs/inode.c
---- linux-3.18.5/fs/btrfs/inode.c	2015-01-17 02:40:16.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/btrfs/inode.c	2015-01-19 12:26:30.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/btrfs/inode.c linux-4.4.110-vs2.3.9/fs/btrfs/inode.c
+--- linux-4.4.110/fs/btrfs/inode.c	2018-01-09 16:35:05.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/btrfs/inode.c	2018-01-09 16:36:24.000000000 +0000
 @@ -43,6 +43,7 @@
- #include <linux/btrfs.h>
  #include <linux/blkdev.h>
  #include <linux/posix_acl_xattr.h>
+ #include <linux/uio.h>
 +#include <linux/vs_tag.h>
  #include "ctree.h"
  #include "disk-io.h"
  #include "transaction.h"
-@@ -3477,6 +3478,9 @@ static void btrfs_read_locked_inode(stru
+@@ -3611,6 +3612,9 @@ static void btrfs_read_locked_inode(stru
  	unsigned long ptr;
  	int maybe_acls;
  	u32 rdev;
@@ -1642,7 +1641,7 @@ diff -NurpP --minimal linux-3.18.5/fs/btrfs/inode.c linux-3.18.5-vs2.3.7.3/fs/bt
  	int ret;
  	bool filled = false;
  	int first_xattr_slot;
-@@ -3504,8 +3508,14 @@ static void btrfs_read_locked_inode(stru
+@@ -3638,8 +3642,14 @@ static void btrfs_read_locked_inode(stru
  				    struct btrfs_inode_item);
  	inode->i_mode = btrfs_inode_mode(leaf, inode_item);
  	set_nlink(inode, btrfs_inode_nlink(leaf, inode_item));
@@ -1658,8 +1657,8 @@ diff -NurpP --minimal linux-3.18.5/fs/btrfs/inode.c linux-3.18.5-vs2.3.7.3/fs/bt
 +	inode->i_tag = INOTAG_KTAG(DX_TAG(inode), kuid, kgid, ktag);
  	btrfs_i_size_write(inode, btrfs_inode_size(leaf, inode_item));
  
- 	tspec = btrfs_inode_atime(inode_item);
-@@ -3629,11 +3639,18 @@ static void fill_inode_item(struct btrfs
+ 	inode->i_atime.tv_sec = btrfs_timespec_sec(leaf, &inode_item->atime);
+@@ -3795,11 +3805,18 @@ static void fill_inode_item(struct btrfs
  			    struct inode *inode)
  {
  	struct btrfs_map_token token;
@@ -1680,7 +1679,7 @@ diff -NurpP --minimal linux-3.18.5/fs/btrfs/inode.c linux-3.18.5-vs2.3.7.3/fs/bt
  	btrfs_set_token_inode_size(leaf, item, BTRFS_I(inode)->disk_i_size,
  				   &token);
  	btrfs_set_token_inode_mode(leaf, item, inode->i_mode, &token);
-@@ -9459,6 +9476,7 @@ static const struct inode_operations btr
+@@ -10062,6 +10079,7 @@ static const struct inode_operations btr
  	.listxattr	= btrfs_listxattr,
  	.removexattr	= btrfs_removexattr,
  	.permission	= btrfs_permission,
@@ -1688,7 +1687,7 @@ diff -NurpP --minimal linux-3.18.5/fs/btrfs/inode.c linux-3.18.5-vs2.3.7.3/fs/bt
  	.get_acl	= btrfs_get_acl,
  	.set_acl	= btrfs_set_acl,
  	.update_time	= btrfs_update_time,
-@@ -9467,6 +9485,7 @@ static const struct inode_operations btr
+@@ -10070,6 +10088,7 @@ static const struct inode_operations btr
  static const struct inode_operations btrfs_dir_ro_inode_operations = {
  	.lookup		= btrfs_lookup,
  	.permission	= btrfs_permission,
@@ -1696,7 +1695,7 @@ diff -NurpP --minimal linux-3.18.5/fs/btrfs/inode.c linux-3.18.5-vs2.3.7.3/fs/bt
  	.get_acl	= btrfs_get_acl,
  	.set_acl	= btrfs_set_acl,
  	.update_time	= btrfs_update_time,
-@@ -9537,6 +9556,7 @@ static const struct inode_operations btr
+@@ -10140,6 +10159,7 @@ static const struct inode_operations btr
  	.removexattr	= btrfs_removexattr,
  	.permission	= btrfs_permission,
  	.fiemap		= btrfs_fiemap,
@@ -1704,10 +1703,10 @@ diff -NurpP --minimal linux-3.18.5/fs/btrfs/inode.c linux-3.18.5-vs2.3.7.3/fs/bt
  	.get_acl	= btrfs_get_acl,
  	.set_acl	= btrfs_set_acl,
  	.update_time	= btrfs_update_time,
-diff -NurpP --minimal linux-3.18.5/fs/btrfs/ioctl.c linux-3.18.5-vs2.3.7.3/fs/btrfs/ioctl.c
---- linux-3.18.5/fs/btrfs/ioctl.c	2015-01-17 02:40:16.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/btrfs/ioctl.c	2015-01-21 09:54:51.000000000 +0000
-@@ -107,10 +107,13 @@ static unsigned int btrfs_flags_to_ioctl
+diff -NurpP --minimal linux-4.4.110/fs/btrfs/ioctl.c linux-4.4.110-vs2.3.9/fs/btrfs/ioctl.c
+--- linux-4.4.110/fs/btrfs/ioctl.c	2018-01-09 16:35:05.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/btrfs/ioctl.c	2018-01-09 16:36:24.000000000 +0000
+@@ -108,10 +108,13 @@ static unsigned int btrfs_flags_to_ioctl
  {
  	unsigned int iflags = 0;
  
@@ -1723,7 +1722,7 @@ diff -NurpP --minimal linux-3.18.5/fs/btrfs/ioctl.c linux-3.18.5-vs2.3.7.3/fs/bt
  	if (flags & BTRFS_INODE_APPEND)
  		iflags |= FS_APPEND_FL;
  	if (flags & BTRFS_INODE_NODUMP)
-@@ -127,34 +130,84 @@ static unsigned int btrfs_flags_to_ioctl
+@@ -128,34 +131,84 @@ static unsigned int btrfs_flags_to_ioctl
  	else if (flags & BTRFS_INODE_NOCOMPRESS)
  		iflags |= FS_NOCOMP_FL;
  
@@ -1813,7 +1812,7 @@ diff -NurpP --minimal linux-3.18.5/fs/btrfs/ioctl.c linux-3.18.5-vs2.3.7.3/fs/bt
   * Inherit flags from the parent inode.
   *
   * Currently only the compression flags and the cow flags are inherited.
-@@ -167,6 +220,7 @@ void btrfs_inherit_iflags(struct inode *
+@@ -168,6 +221,7 @@ void btrfs_inherit_iflags(struct inode *
  		return;
  
  	flags = BTRFS_I(dir)->flags;
@@ -1821,7 +1820,7 @@ diff -NurpP --minimal linux-3.18.5/fs/btrfs/ioctl.c linux-3.18.5-vs2.3.7.3/fs/bt
  
  	if (flags & BTRFS_INODE_NOCOMPRESS) {
  		BTRFS_I(inode)->flags &= ~BTRFS_INODE_COMPRESS;
-@@ -185,6 +239,30 @@ void btrfs_inherit_iflags(struct inode *
+@@ -186,6 +240,30 @@ void btrfs_inherit_iflags(struct inode *
  	btrfs_update_iflags(inode);
  }
  
@@ -1852,7 +1851,7 @@ diff -NurpP --minimal linux-3.18.5/fs/btrfs/ioctl.c linux-3.18.5-vs2.3.7.3/fs/bt
  static int btrfs_ioctl_getflags(struct file *file, void __user *arg)
  {
  	struct btrfs_inode *ip = BTRFS_I(file_inode(file));
-@@ -247,21 +325,27 @@ static int btrfs_ioctl_setflags(struct f
+@@ -248,21 +326,27 @@ static int btrfs_ioctl_setflags(struct f
  
  	flags = btrfs_mask_flags(inode->i_mode, flags);
  	oldflags = btrfs_flags_to_ioctl(ip->flags);
@@ -1885,32 +1884,32 @@ diff -NurpP --minimal linux-3.18.5/fs/btrfs/ioctl.c linux-3.18.5-vs2.3.7.3/fs/bt
  	if (flags & FS_APPEND_FL)
  		ip->flags |= BTRFS_INODE_APPEND;
  	else
-diff -NurpP --minimal linux-3.18.5/fs/btrfs/super.c linux-3.18.5-vs2.3.7.3/fs/btrfs/super.c
---- linux-3.18.5/fs/btrfs/super.c	2015-02-05 18:02:44.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/btrfs/super.c	2015-01-19 10:57:46.000000000 +0000
-@@ -325,7 +325,7 @@ enum {
- 	Opt_commit_interval, Opt_barrier, Opt_nodefrag, Opt_nodiscard,
- 	Opt_noenospc_debug, Opt_noflushoncommit, Opt_acl, Opt_datacow,
- 	Opt_datasum, Opt_treelog, Opt_noinode_cache,
+diff -NurpP --minimal linux-4.4.110/fs/btrfs/super.c linux-4.4.110-vs2.3.9/fs/btrfs/super.c
+--- linux-4.4.110/fs/btrfs/super.c	2018-01-09 16:35:05.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/btrfs/super.c	2018-01-09 17:25:27.000000000 +0000
+@@ -306,7 +306,7 @@ enum {
+ #ifdef CONFIG_BTRFS_DEBUG
+ 	Opt_fragment_data, Opt_fragment_metadata, Opt_fragment_all,
+ #endif
 -	Opt_err,
 +	Opt_tag, Opt_notag, Opt_tagid, Opt_err,
  };
  
  static match_table_t tokens = {
-@@ -377,6 +377,9 @@ static match_table_t tokens = {
- 	{Opt_rescan_uuid_tree, "rescan_uuid_tree"},
- 	{Opt_fatal_errors, "fatal_errors=%s"},
- 	{Opt_commit_interval, "commit=%d"},
+@@ -363,6 +363,9 @@ static match_table_t tokens = {
+ 	{Opt_fragment_metadata, "fragment=metadata"},
+ 	{Opt_fragment_all, "fragment=all"},
+ #endif
 +	{Opt_tag, "tag"},
 +	{Opt_notag, "notag"},
 +	{Opt_tagid, "tagid=%u"},
  	{Opt_err, NULL},
  };
  
-@@ -743,6 +746,22 @@ int btrfs_parse_options(struct btrfs_roo
- 				info->commit_interval = BTRFS_DEFAULT_COMMIT_INTERVAL;
- 			}
+@@ -745,6 +748,22 @@ int btrfs_parse_options(struct btrfs_roo
+ 			btrfs_set_opt(info->mount_opt, FRAGMENT_DATA);
  			break;
+ #endif
 +#ifndef CONFIG_TAGGING_NONE
 +		case Opt_tag:
 +			printk(KERN_INFO "btrfs: use tagging\n");
@@ -1930,7 +1929,7 @@ diff -NurpP --minimal linux-3.18.5/fs/btrfs/super.c linux-3.18.5-vs2.3.7.3/fs/bt
  		case Opt_err:
  			btrfs_info(root->fs_info, "unrecognized mount option '%s'", p);
  			ret = -EINVAL;
-@@ -1495,6 +1514,12 @@ static int btrfs_remount(struct super_bl
+@@ -1647,6 +1666,12 @@ static int btrfs_remount(struct super_bl
  	btrfs_resize_thread_pool(fs_info,
  		fs_info->thread_pool_size, old_thread_pool_size);
  
@@ -1943,9 +1942,9 @@ diff -NurpP --minimal linux-3.18.5/fs/btrfs/super.c linux-3.18.5-vs2.3.7.3/fs/bt
  	if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY))
  		goto out;
  
-diff -NurpP --minimal linux-3.18.5/fs/char_dev.c linux-3.18.5-vs2.3.7.3/fs/char_dev.c
---- linux-3.18.5/fs/char_dev.c	2014-01-22 20:39:05.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/char_dev.c	2015-01-19 10:57:46.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/char_dev.c linux-4.4.110-vs2.3.9/fs/char_dev.c
+--- linux-4.4.110/fs/char_dev.c	2016-07-05 04:12:30.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/char_dev.c	2018-01-09 16:36:24.000000000 +0000
 @@ -21,6 +21,8 @@
  #include <linux/mutex.h>
  #include <linux/backing-dev.h>
@@ -1955,7 +1954,7 @@ diff -NurpP --minimal linux-3.18.5/fs/char_dev.c linux-3.18.5-vs2.3.7.3/fs/char_
  
  #include "internal.h"
  
-@@ -372,14 +374,21 @@ static int chrdev_open(struct inode *ino
+@@ -350,14 +352,21 @@ static int chrdev_open(struct inode *ino
  	struct cdev *p;
  	struct cdev *new = NULL;
  	int ret = 0;
@@ -1978,18 +1977,34 @@ diff -NurpP --minimal linux-3.18.5/fs/char_dev.c linux-3.18.5-vs2.3.7.3/fs/char_
  		if (!kobj)
  			return -ENXIO;
  		new = container_of(kobj, struct cdev, kobj);
-diff -NurpP --minimal linux-3.18.5/fs/dcache.c linux-3.18.5-vs2.3.7.3/fs/dcache.c
---- linux-3.18.5/fs/dcache.c	2015-02-05 18:02:45.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/dcache.c	2015-01-19 12:06:59.000000000 +0000
-@@ -38,6 +38,7 @@
- #include <linux/prefetch.h>
+diff -NurpP --minimal linux-4.4.110/fs/dcache.c linux-4.4.110-vs2.3.9/fs/dcache.c
+--- linux-4.4.110/fs/dcache.c	2018-01-09 16:35:05.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/dcache.c	2018-01-09 16:36:24.000000000 +0000
+@@ -39,6 +39,7 @@
  #include <linux/ratelimit.h>
  #include <linux/list_lru.h>
+ #include <linux/kasan.h>
 +#include <linux/vs_limit.h>
+ 
  #include "internal.h"
  #include "mount.h"
+@@ -677,6 +678,7 @@ static inline bool fast_dput(struct dent
+ 		spin_lock(&dentry->d_lock);
+ 		if (dentry->d_lockref.count > 1) {
+ 			dentry->d_lockref.count--;
++			vx_dentry_dec(dentry);
+ 			spin_unlock(&dentry->d_lock);
+ 			return 1;
+ 		}
+@@ -806,6 +808,7 @@ repeat:
+ 	dentry_lru_add(dentry);
+ 
+ 	dentry->d_lockref.count--;
++	vx_dentry_dec(dentry);
+ 	spin_unlock(&dentry->d_lock);
+ 	return;
  
-@@ -654,6 +655,7 @@ EXPORT_SYMBOL(dput);
+@@ -823,6 +826,7 @@ EXPORT_SYMBOL(dput);
  static inline void __dget_dlock(struct dentry *dentry)
  {
  	dentry->d_lockref.count++;
@@ -1997,7 +2012,7 @@ diff -NurpP --minimal linux-3.18.5/fs/dcache.c linux-3.18.5-vs2.3.7.3/fs/dcache.
  }
  
  static inline void __dget(struct dentry *dentry)
-@@ -666,6 +668,8 @@ struct dentry *dget_parent(struct dentry
+@@ -835,6 +839,8 @@ struct dentry *dget_parent(struct dentry
  	int gotref;
  	struct dentry *ret;
  
@@ -2006,7 +2021,23 @@ diff -NurpP --minimal linux-3.18.5/fs/dcache.c linux-3.18.5-vs2.3.7.3/fs/dcache.
  	/*
  	 * Do optimistic parent lookup without any
  	 * locking.
-@@ -1410,6 +1414,9 @@ struct dentry *__d_alloc(struct super_bl
+@@ -865,6 +871,7 @@ repeat:
+ 	rcu_read_unlock();
+ 	BUG_ON(!ret->d_lockref.count);
+ 	ret->d_lockref.count++;
++	vx_dentry_inc(ret);
+ 	spin_unlock(&ret->d_lock);
+ 	return ret;
+ }
+@@ -1019,6 +1026,7 @@ static void shrink_dentry_list(struct li
+ 			parent = lock_parent(dentry);
+ 			if (dentry->d_lockref.count != 1) {
+ 				dentry->d_lockref.count--;
++				vx_dentry_dec(dentry);
+ 				spin_unlock(&dentry->d_lock);
+ 				if (parent)
+ 					spin_unlock(&parent->d_lock);
+@@ -1581,6 +1589,9 @@ struct dentry *__d_alloc(struct super_bl
  	struct dentry *dentry;
  	char *dname;
  
@@ -2016,7 +2047,7 @@ diff -NurpP --minimal linux-3.18.5/fs/dcache.c linux-3.18.5-vs2.3.7.3/fs/dcache.
  	dentry = kmem_cache_alloc(dentry_cache, GFP_KERNEL);
  	if (!dentry)
  		return NULL;
-@@ -1445,6 +1452,7 @@ struct dentry *__d_alloc(struct super_bl
+@@ -1619,6 +1630,7 @@ struct dentry *__d_alloc(struct super_bl
  
  	dentry->d_lockref.count = 1;
  	dentry->d_flags = 0;
@@ -2024,7 +2055,7 @@ diff -NurpP --minimal linux-3.18.5/fs/dcache.c linux-3.18.5-vs2.3.7.3/fs/dcache.
  	spin_lock_init(&dentry->d_lock);
  	seqcount_init(&dentry->d_seq);
  	dentry->d_inode = NULL;
-@@ -2184,6 +2192,7 @@ struct dentry *__d_lookup(const struct d
+@@ -2355,6 +2367,7 @@ struct dentry *__d_lookup(const struct d
  		}
  
  		dentry->d_lockref.count++;
@@ -2032,9 +2063,17 @@ diff -NurpP --minimal linux-3.18.5/fs/dcache.c linux-3.18.5-vs2.3.7.3/fs/dcache.
  		found = dentry;
  		spin_unlock(&dentry->d_lock);
  		break;
-diff -NurpP --minimal linux-3.18.5/fs/devpts/inode.c linux-3.18.5-vs2.3.7.3/fs/devpts/inode.c
---- linux-3.18.5/fs/devpts/inode.c	2014-09-03 13:19:39.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/devpts/inode.c	2015-01-19 10:57:47.000000000 +0000
+@@ -3371,6 +3384,7 @@ static enum d_walk_ret d_genocide_kill(v
+ 		if (!(dentry->d_flags & DCACHE_GENOCIDE)) {
+ 			dentry->d_flags |= DCACHE_GENOCIDE;
+ 			dentry->d_lockref.count--;
++			vx_dentry_dec(dentry);
+ 		}
+ 	}
+ 	return D_WALK_CONTINUE;
+diff -NurpP --minimal linux-4.4.110/fs/devpts/inode.c linux-4.4.110-vs2.3.9/fs/devpts/inode.c
+--- linux-4.4.110/fs/devpts/inode.c	2018-01-09 16:35:05.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/devpts/inode.c	2018-01-09 16:36:24.000000000 +0000
 @@ -27,6 +27,7 @@
  #include <linux/parser.h>
  #include <linux/fsnotify.h>
@@ -2065,7 +2104,7 @@ diff -NurpP --minimal linux-3.18.5/fs/devpts/inode.c linux-3.18.5-vs2.3.7.3/fs/d
  /*
   * sysctl support for setting limits on the number of Unix98 ptys allocated.
   * Otherwise one can eat up all kernel memory by opening /dev/ptmx repeatedly.
-@@ -350,6 +366,34 @@ static int devpts_show_options(struct se
+@@ -353,6 +369,34 @@ static int devpts_show_options(struct se
  	return 0;
  }
  
@@ -2100,7 +2139,7 @@ diff -NurpP --minimal linux-3.18.5/fs/devpts/inode.c linux-3.18.5-vs2.3.7.3/fs/d
  static const struct super_operations devpts_sops = {
  	.statfs		= simple_statfs,
  	.remount_fs	= devpts_remount,
-@@ -393,8 +437,10 @@ devpts_fill_super(struct super_block *s,
+@@ -397,8 +441,10 @@ devpts_fill_super(struct super_block *s,
  	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
  	inode->i_mode = S_IFDIR | S_IRUGO | S_IXUGO | S_IWUSR;
  	inode->i_op = &simple_dir_inode_operations;
@@ -2112,7 +2151,7 @@ diff -NurpP --minimal linux-3.18.5/fs/devpts/inode.c linux-3.18.5-vs2.3.7.3/fs/d
  
  	s->s_root = d_make_root(inode);
  	if (s->s_root)
-@@ -598,6 +644,9 @@ struct inode *devpts_pty_new(struct inod
+@@ -630,6 +676,9 @@ struct inode *devpts_pty_new(struct pts_
  	inode->i_gid = opts->setgid ? opts->gid : current_fsgid();
  	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
  	init_special_inode(inode, S_IFCHR|opts->mode, device);
@@ -2122,9 +2161,9 @@ diff -NurpP --minimal linux-3.18.5/fs/devpts/inode.c linux-3.18.5-vs2.3.7.3/fs/d
  	inode->i_private = priv;
  
  	sprintf(s, "%d", index);
-diff -NurpP --minimal linux-3.18.5/fs/ext2/balloc.c linux-3.18.5-vs2.3.7.3/fs/ext2/balloc.c
---- linux-3.18.5/fs/ext2/balloc.c	2013-05-31 13:45:23.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/ext2/balloc.c	2015-01-19 10:57:47.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/ext2/balloc.c linux-4.4.110-vs2.3.9/fs/ext2/balloc.c
+--- linux-4.4.110/fs/ext2/balloc.c	2015-04-12 22:12:50.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/ext2/balloc.c	2018-01-09 16:36:24.000000000 +0000
 @@ -693,7 +693,6 @@ ext2_try_to_allocate(struct super_block
  			start = 0;
  		end = EXT2_BLOCKS_PER_GROUP(sb);
@@ -2133,9 +2172,9 @@ diff -NurpP --minimal linux-3.18.5/fs/ext2/balloc.c linux-3.18.5-vs2.3.7.3/fs/ex
  	BUG_ON(start > EXT2_BLOCKS_PER_GROUP(sb));
  
  repeat:
-diff -NurpP --minimal linux-3.18.5/fs/ext2/ext2.h linux-3.18.5-vs2.3.7.3/fs/ext2/ext2.h
---- linux-3.18.5/fs/ext2/ext2.h	2012-12-11 03:30:57.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/ext2/ext2.h	2015-01-19 10:57:47.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/ext2/ext2.h linux-4.4.110-vs2.3.9/fs/ext2/ext2.h
+--- linux-4.4.110/fs/ext2/ext2.h	2016-07-05 04:15:07.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/ext2/ext2.h	2018-01-09 16:36:24.000000000 +0000
 @@ -244,8 +244,12 @@ struct ext2_group_desc
  #define EXT2_NOTAIL_FL			FS_NOTAIL_FL	/* file tail should not be merged */
  #define EXT2_DIRSYNC_FL			FS_DIRSYNC_FL	/* dirsync behaviour (directories only) */
@@ -2167,15 +2206,15 @@ diff -NurpP --minimal linux-3.18.5/fs/ext2/ext2.h linux-3.18.5-vs2.3.7.3/fs/ext2
  #define i_reserved2	osd2.linux2.l_i_reserved2
  
  /*
-@@ -384,6 +390,7 @@ struct ext2_inode {
- #define EXT2_MOUNT_USRQUOTA		0x020000  /* user quota */
- #define EXT2_MOUNT_GRPQUOTA		0x040000  /* group quota */
- #define EXT2_MOUNT_RESERVATION		0x080000  /* Preallocation */
-+#define EXT2_MOUNT_TAGGED		(1<<24)	  /* Enable Context Tags */
+@@ -389,6 +395,7 @@ struct ext2_inode {
+ #else
+ #define EXT2_MOUNT_DAX			0
+ #endif
++#define EXT2_MOUNT_TAGGED		0x200000  /* Enable Context Tags */
  
  
  #define clear_opt(o, opt)		o &= ~EXT2_MOUNT_##opt
-@@ -757,6 +764,7 @@ extern void ext2_set_inode_flags(struct
+@@ -776,6 +783,7 @@ extern void ext2_set_inode_flags(struct
  extern void ext2_get_inode_flags(struct ext2_inode_info *);
  extern int ext2_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
  		       u64 start, u64 len);
@@ -2183,18 +2222,18 @@ diff -NurpP --minimal linux-3.18.5/fs/ext2/ext2.h linux-3.18.5-vs2.3.7.3/fs/ext2
  
  /* ioctl.c */
  extern long ext2_ioctl(struct file *, unsigned int, unsigned long);
-diff -NurpP --minimal linux-3.18.5/fs/ext2/file.c linux-3.18.5-vs2.3.7.3/fs/ext2/file.c
---- linux-3.18.5/fs/ext2/file.c	2014-09-03 13:19:39.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/ext2/file.c	2015-01-19 10:57:47.000000000 +0000
-@@ -105,4 +105,5 @@ const struct inode_operations ext2_file_
+diff -NurpP --minimal linux-4.4.110/fs/ext2/file.c linux-4.4.110-vs2.3.9/fs/ext2/file.c
+--- linux-4.4.110/fs/ext2/file.c	2016-07-05 04:15:07.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/ext2/file.c	2018-01-09 16:36:24.000000000 +0000
+@@ -202,4 +202,5 @@ const struct inode_operations ext2_file_
  	.get_acl	= ext2_get_acl,
  	.set_acl	= ext2_set_acl,
  	.fiemap		= ext2_fiemap,
 +	.sync_flags	= ext2_sync_flags,
  };
-diff -NurpP --minimal linux-3.18.5/fs/ext2/ialloc.c linux-3.18.5-vs2.3.7.3/fs/ext2/ialloc.c
---- linux-3.18.5/fs/ext2/ialloc.c	2014-06-12 13:02:41.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/ext2/ialloc.c	2015-01-19 10:57:47.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/ext2/ialloc.c linux-4.4.110-vs2.3.9/fs/ext2/ialloc.c
+--- linux-4.4.110/fs/ext2/ialloc.c	2016-07-05 04:12:30.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/ext2/ialloc.c	2018-01-09 16:36:24.000000000 +0000
 @@ -17,6 +17,7 @@
  #include <linux/backing-dev.h>
  #include <linux/buffer_head.h>
@@ -2211,35 +2250,35 @@ diff -NurpP --minimal linux-3.18.5/fs/ext2/ialloc.c linux-3.18.5-vs2.3.7.3/fs/ex
  	} else
  		inode_init_owner(inode, dir, mode);
  
-diff -NurpP --minimal linux-3.18.5/fs/ext2/inode.c linux-3.18.5-vs2.3.7.3/fs/ext2/inode.c
---- linux-3.18.5/fs/ext2/inode.c	2014-09-03 13:19:39.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/ext2/inode.c	2015-01-19 10:57:47.000000000 +0000
-@@ -32,6 +32,7 @@
+diff -NurpP --minimal linux-4.4.110/fs/ext2/inode.c linux-4.4.110-vs2.3.9/fs/ext2/inode.c
+--- linux-4.4.110/fs/ext2/inode.c	2016-07-05 04:15:07.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/ext2/inode.c	2018-01-09 16:36:24.000000000 +0000
+@@ -33,6 +33,7 @@
  #include <linux/fiemap.h>
  #include <linux/namei.h>
- #include <linux/aio.h>
+ #include <linux/uio.h>
 +#include <linux/vs_tag.h>
  #include "ext2.h"
  #include "acl.h"
- #include "xip.h"
-@@ -1182,7 +1183,7 @@ static void ext2_truncate_blocks(struct
+ #include "xattr.h"
+@@ -1188,7 +1189,7 @@ static void ext2_truncate_blocks(struct
  		return;
  	if (ext2_inode_is_fast_symlink(inode))
  		return;
 -	if (IS_APPEND(inode) || IS_IMMUTABLE(inode))
 +	if (IS_APPEND(inode) || IS_IXORUNLINK(inode))
  		return;
- 	__ext2_truncate_blocks(inode, offset);
- }
-@@ -1273,36 +1274,61 @@ void ext2_set_inode_flags(struct inode *
+ 
+ 	dax_sem_down_write(EXT2_I(inode));
+@@ -1284,39 +1285,62 @@ void ext2_set_inode_flags(struct inode *
  {
  	unsigned int flags = EXT2_I(inode)->i_flags;
  
--	inode->i_flags &= ~(S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC);
-+	inode->i_flags &= ~(S_IMMUTABLE | S_IXUNLINK |
+-	inode->i_flags &= ~(S_SYNC | S_APPEND | S_IMMUTABLE | S_NOATIME |
+-				S_DIRSYNC | S_DAX);
++	inode->i_flags &= ~(S_IMMUTABLE | S_IXUNLINK | S_DAX |
 +		S_SYNC | S_APPEND | S_NOATIME | S_DIRSYNC);
 +
-+
 +	if (flags & EXT2_IMMUTABLE_FL)
 +		inode->i_flags |= S_IMMUTABLE;
 +	if (flags & EXT2_IXUNLINK_FL)
@@ -2255,6 +2294,8 @@ diff -NurpP --minimal linux-3.18.5/fs/ext2/inode.c linux-3.18.5-vs2.3.7.3/fs/ext
  		inode->i_flags |= S_NOATIME;
  	if (flags & EXT2_DIRSYNC_FL)
  		inode->i_flags |= S_DIRSYNC;
+ 	if (test_opt(inode->i_sb, DAX))
+ 		inode->i_flags |= S_DAX;
 +
 +	inode->i_vflags &= ~(V_BARRIER | V_COW);
 +
@@ -2300,7 +2341,7 @@ diff -NurpP --minimal linux-3.18.5/fs/ext2/inode.c linux-3.18.5-vs2.3.7.3/fs/ext
  }
  
  struct inode *ext2_iget (struct super_block *sb, unsigned long ino)
-@@ -1338,8 +1364,10 @@ struct inode *ext2_iget (struct super_bl
+@@ -1352,8 +1376,10 @@ struct inode *ext2_iget (struct super_bl
  		i_uid |= le16_to_cpu(raw_inode->i_uid_high) << 16;
  		i_gid |= le16_to_cpu(raw_inode->i_gid_high) << 16;
  	}
@@ -2313,7 +2354,7 @@ diff -NurpP --minimal linux-3.18.5/fs/ext2/inode.c linux-3.18.5-vs2.3.7.3/fs/ext
  	set_nlink(inode, le16_to_cpu(raw_inode->i_links_count));
  	inode->i_size = le32_to_cpu(raw_inode->i_size);
  	inode->i_atime.tv_sec = (signed)le32_to_cpu(raw_inode->i_atime);
-@@ -1437,8 +1465,10 @@ static int __ext2_write_inode(struct ino
+@@ -1449,8 +1475,10 @@ static int __ext2_write_inode(struct ino
  	struct ext2_inode_info *ei = EXT2_I(inode);
  	struct super_block *sb = inode->i_sb;
  	ino_t ino = inode->i_ino;
@@ -2326,7 +2367,7 @@ diff -NurpP --minimal linux-3.18.5/fs/ext2/inode.c linux-3.18.5-vs2.3.7.3/fs/ext
  	struct buffer_head * bh;
  	struct ext2_inode * raw_inode = ext2_get_inode(sb, ino, &bh);
  	int n;
-@@ -1474,6 +1504,9 @@ static int __ext2_write_inode(struct ino
+@@ -1486,6 +1514,9 @@ static int __ext2_write_inode(struct ino
  		raw_inode->i_uid_high = 0;
  		raw_inode->i_gid_high = 0;
  	}
@@ -2336,9 +2377,9 @@ diff -NurpP --minimal linux-3.18.5/fs/ext2/inode.c linux-3.18.5-vs2.3.7.3/fs/ext
  	raw_inode->i_links_count = cpu_to_le16(inode->i_nlink);
  	raw_inode->i_size = cpu_to_le32(inode->i_size);
  	raw_inode->i_atime = cpu_to_le32(inode->i_atime.tv_sec);
-@@ -1554,7 +1587,8 @@ int ext2_setattr(struct dentry *dentry,
- 	if (is_quota_modification(inode, iattr))
- 		dquot_initialize(inode);
+@@ -1569,7 +1600,8 @@ int ext2_setattr(struct dentry *dentry,
+ 			return error;
+ 	}
  	if ((iattr->ia_valid & ATTR_UID && !uid_eq(iattr->ia_uid, inode->i_uid)) ||
 -	    (iattr->ia_valid & ATTR_GID && !gid_eq(iattr->ia_gid, inode->i_gid))) {
 +	    (iattr->ia_valid & ATTR_GID && !gid_eq(iattr->ia_gid, inode->i_gid)) ||
@@ -2346,9 +2387,9 @@ diff -NurpP --minimal linux-3.18.5/fs/ext2/inode.c linux-3.18.5-vs2.3.7.3/fs/ext
  		error = dquot_transfer(inode, iattr);
  		if (error)
  			return error;
-diff -NurpP --minimal linux-3.18.5/fs/ext2/ioctl.c linux-3.18.5-vs2.3.7.3/fs/ext2/ioctl.c
---- linux-3.18.5/fs/ext2/ioctl.c	2013-05-31 13:45:23.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/ext2/ioctl.c	2015-01-19 10:57:47.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/ext2/ioctl.c linux-4.4.110-vs2.3.9/fs/ext2/ioctl.c
+--- linux-4.4.110/fs/ext2/ioctl.c	2015-04-12 22:12:50.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/ext2/ioctl.c	2018-01-09 16:36:24.000000000 +0000
 @@ -17,6 +17,16 @@
  #include <asm/uaccess.h>
  
@@ -2398,9 +2439,9 @@ diff -NurpP --minimal linux-3.18.5/fs/ext2/ioctl.c linux-3.18.5-vs2.3.7.3/fs/ext
  		flags |= oldflags & ~EXT2_FL_USER_MODIFIABLE;
  		ei->i_flags = flags;
  
-diff -NurpP --minimal linux-3.18.5/fs/ext2/namei.c linux-3.18.5-vs2.3.7.3/fs/ext2/namei.c
---- linux-3.18.5/fs/ext2/namei.c	2014-06-12 11:34:57.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/ext2/namei.c	2015-01-19 10:57:47.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/ext2/namei.c linux-4.4.110-vs2.3.9/fs/ext2/namei.c
+--- linux-4.4.110/fs/ext2/namei.c	2016-07-05 04:15:07.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/ext2/namei.c	2018-01-09 16:36:24.000000000 +0000
 @@ -32,6 +32,7 @@
  
  #include <linux/pagemap.h>
@@ -2409,7 +2450,7 @@ diff -NurpP --minimal linux-3.18.5/fs/ext2/namei.c linux-3.18.5-vs2.3.7.3/fs/ext
  #include "ext2.h"
  #include "xattr.h"
  #include "acl.h"
-@@ -73,6 +74,7 @@ static struct dentry *ext2_lookup(struct
+@@ -72,6 +73,7 @@ static struct dentry *ext2_lookup(struct
  					(unsigned long) ino);
  			return ERR_PTR(-EIO);
  		}
@@ -2417,7 +2458,7 @@ diff -NurpP --minimal linux-3.18.5/fs/ext2/namei.c linux-3.18.5-vs2.3.7.3/fs/ext
  	}
  	return d_splice_alias(inode, dentry);
  }
-@@ -433,6 +435,7 @@ const struct inode_operations ext2_speci
+@@ -446,6 +448,7 @@ const struct inode_operations ext2_speci
  	.removexattr	= generic_removexattr,
  #endif
  	.setattr	= ext2_setattr,
@@ -2425,30 +2466,30 @@ diff -NurpP --minimal linux-3.18.5/fs/ext2/namei.c linux-3.18.5-vs2.3.7.3/fs/ext
  	.get_acl	= ext2_get_acl,
  	.set_acl	= ext2_set_acl,
  };
-diff -NurpP --minimal linux-3.18.5/fs/ext2/super.c linux-3.18.5-vs2.3.7.3/fs/ext2/super.c
---- linux-3.18.5/fs/ext2/super.c	2015-01-17 02:40:17.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/ext2/super.c	2015-01-19 10:57:47.000000000 +0000
-@@ -395,7 +395,8 @@ enum {
+diff -NurpP --minimal linux-4.4.110/fs/ext2/super.c linux-4.4.110-vs2.3.9/fs/ext2/super.c
+--- linux-4.4.110/fs/ext2/super.c	2016-07-05 04:15:07.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/ext2/super.c	2018-01-09 16:36:24.000000000 +0000
+@@ -408,7 +408,8 @@ enum {
  	Opt_err_ro, Opt_nouid32, Opt_nocheck, Opt_debug,
  	Opt_oldalloc, Opt_orlov, Opt_nobh, Opt_user_xattr, Opt_nouser_xattr,
- 	Opt_acl, Opt_noacl, Opt_xip, Opt_ignore, Opt_err, Opt_quota,
+ 	Opt_acl, Opt_noacl, Opt_xip, Opt_dax, Opt_ignore, Opt_err, Opt_quota,
 -	Opt_usrquota, Opt_grpquota, Opt_reservation, Opt_noreservation
 +	Opt_usrquota, Opt_grpquota, Opt_reservation, Opt_noreservation,
 +	Opt_tag, Opt_notag, Opt_tagid
  };
  
  static const match_table_t tokens = {
-@@ -423,6 +424,9 @@ static const match_table_t tokens = {
+@@ -436,6 +437,9 @@ static const match_table_t tokens = {
  	{Opt_acl, "acl"},
  	{Opt_noacl, "noacl"},
  	{Opt_xip, "xip"},
 +	{Opt_tag, "tag"},
 +	{Opt_notag, "notag"},
 +	{Opt_tagid, "tagid=%u"},
+ 	{Opt_dax, "dax"},
  	{Opt_grpquota, "grpquota"},
  	{Opt_ignore, "noquota"},
- 	{Opt_quota, "quota"},
-@@ -506,6 +510,20 @@ static int parse_options(char *options,
+@@ -520,6 +524,20 @@ static int parse_options(char *options,
  		case Opt_nouid32:
  			set_opt (sbi->s_mount_opt, NO_UID32);
  			break;
@@ -2469,7 +2510,7 @@ diff -NurpP --minimal linux-3.18.5/fs/ext2/super.c linux-3.18.5-vs2.3.7.3/fs/ext
  		case Opt_nocheck:
  			clear_opt (sbi->s_mount_opt, CHECK);
  			break;
-@@ -864,6 +882,8 @@ static int ext2_fill_super(struct super_
+@@ -884,6 +902,8 @@ static int ext2_fill_super(struct super_
  	if (!parse_options((char *) data, sb))
  		goto failed_mount;
  
@@ -2478,7 +2519,7 @@ diff -NurpP --minimal linux-3.18.5/fs/ext2/super.c linux-3.18.5-vs2.3.7.3/fs/ext
  	sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
  		((EXT2_SB(sb)->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ?
  		 MS_POSIXACL : 0);
-@@ -1270,6 +1290,14 @@ static int ext2_remount (struct super_bl
+@@ -1294,6 +1314,14 @@ static int ext2_remount (struct super_bl
  		err = -EINVAL;
  		goto restore_opts;
  	}
@@ -2493,406 +2534,22 @@ diff -NurpP --minimal linux-3.18.5/fs/ext2/super.c linux-3.18.5-vs2.3.7.3/fs/ext
  
  	sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
  		((sbi->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0);
-diff -NurpP --minimal linux-3.18.5/fs/ext3/ext3.h linux-3.18.5-vs2.3.7.3/fs/ext3/ext3.h
---- linux-3.18.5/fs/ext3/ext3.h	2015-01-17 02:40:17.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/ext3/ext3.h	2015-01-19 10:57:47.000000000 +0000
-@@ -151,10 +151,14 @@ struct ext3_group_desc
- #define EXT3_NOTAIL_FL			0x00008000 /* file tail should not be merged */
- #define EXT3_DIRSYNC_FL			0x00010000 /* dirsync behaviour (directories only) */
- #define EXT3_TOPDIR_FL			0x00020000 /* Top of directory hierarchies*/
-+#define EXT3_IXUNLINK_FL		0x08000000 /* Immutable invert on unlink */
- #define EXT3_RESERVED_FL		0x80000000 /* reserved for ext3 lib */
- 
--#define EXT3_FL_USER_VISIBLE		0x0003DFFF /* User visible flags */
--#define EXT3_FL_USER_MODIFIABLE		0x000380FF /* User modifiable flags */
-+#define EXT3_BARRIER_FL			0x04000000 /* Barrier for chroot() */
-+#define EXT3_COW_FL			0x20000000 /* Copy on Write marker */
-+
-+#define EXT3_FL_USER_VISIBLE		0x0103DFFF /* User visible flags */
-+#define EXT3_FL_USER_MODIFIABLE		0x010380FF /* User modifiable flags */
- 
- /* Flags that should be inherited by new inodes from their parent. */
- #define EXT3_FL_INHERITED (EXT3_SECRM_FL | EXT3_UNRM_FL | EXT3_COMPR_FL |\
-@@ -292,7 +296,8 @@ struct ext3_inode {
- 			__u16	i_pad1;
- 			__le16	l_i_uid_high;	/* these 2 fields    */
- 			__le16	l_i_gid_high;	/* were reserved2[0] */
--			__u32	l_i_reserved2;
-+			__le16	l_i_tag;	/* Context Tag */
-+			__u16	l_i_reserved2;
- 		} linux2;
- 		struct {
- 			__u8	h_i_frag;	/* Fragment number */
-@@ -322,6 +327,7 @@ struct ext3_inode {
- #define i_gid_low	i_gid
- #define i_uid_high	osd2.linux2.l_i_uid_high
- #define i_gid_high	osd2.linux2.l_i_gid_high
-+#define i_raw_tag	osd2.linux2.l_i_tag
- #define i_reserved2	osd2.linux2.l_i_reserved2
- 
- /*
-@@ -366,6 +372,7 @@ struct ext3_inode {
- #define EXT3_MOUNT_GRPQUOTA		0x200000 /* "old" group quota */
- #define EXT3_MOUNT_DATA_ERR_ABORT	0x400000 /* Abort on file data write
- 						  * error in ordered mode */
-+#define EXT3_MOUNT_TAGGED		(1<<24) /* Enable Context Tags */
- 
- /* Compatibility, for having both ext2_fs.h and ext3_fs.h included at once */
- #ifndef _LINUX_EXT2_FS_H
-@@ -1063,6 +1070,7 @@ extern void ext3_get_inode_flags(struct
- extern void ext3_set_aops(struct inode *inode);
- extern int ext3_fiemap(struct inode *inode, struct fiemap_extent_info *fieinfo,
- 		       u64 start, u64 len);
-+extern int ext3_sync_flags(struct inode *, int, int);
- 
- /* ioctl.c */
- extern long ext3_ioctl(struct file *, unsigned int, unsigned long);
-diff -NurpP --minimal linux-3.18.5/fs/ext3/file.c linux-3.18.5-vs2.3.7.3/fs/ext3/file.c
---- linux-3.18.5/fs/ext3/file.c	2014-09-03 13:19:39.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/ext3/file.c	2015-01-19 10:57:47.000000000 +0000
-@@ -77,5 +77,6 @@ const struct inode_operations ext3_file_
- 	.get_acl	= ext3_get_acl,
- 	.set_acl	= ext3_set_acl,
- 	.fiemap		= ext3_fiemap,
-+	.sync_flags	= ext3_sync_flags,
- };
- 
-diff -NurpP --minimal linux-3.18.5/fs/ext3/ialloc.c linux-3.18.5-vs2.3.7.3/fs/ext3/ialloc.c
---- linux-3.18.5/fs/ext3/ialloc.c	2014-06-12 13:02:41.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/ext3/ialloc.c	2015-01-19 10:57:47.000000000 +0000
-@@ -14,6 +14,7 @@
- 
- #include <linux/quotaops.h>
- #include <linux/random.h>
-+#include <linux/vs_tag.h>
- 
- #include "ext3.h"
- #include "xattr.h"
-@@ -469,6 +470,7 @@ got:
- 		inode->i_mode = mode;
- 		inode->i_uid = current_fsuid();
- 		inode->i_gid = dir->i_gid;
-+		i_tag_write(inode, dx_current_fstag(sb));
- 	} else
- 		inode_init_owner(inode, dir, mode);
- 
-diff -NurpP --minimal linux-3.18.5/fs/ext3/inode.c linux-3.18.5-vs2.3.7.3/fs/ext3/inode.c
---- linux-3.18.5/fs/ext3/inode.c	2014-09-03 13:19:39.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/ext3/inode.c	2015-01-19 10:57:47.000000000 +0000
-@@ -28,6 +28,8 @@
- #include <linux/mpage.h>
- #include <linux/namei.h>
- #include <linux/aio.h>
-+#include <linux/vs_tag.h>
-+
- #include "ext3.h"
- #include "xattr.h"
- #include "acl.h"
-@@ -2813,36 +2815,60 @@ void ext3_set_inode_flags(struct inode *
- {
- 	unsigned int flags = EXT3_I(inode)->i_flags;
- 
--	inode->i_flags &= ~(S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC);
-+	inode->i_flags &= ~(S_IMMUTABLE | S_IXUNLINK |
-+		S_SYNC | S_APPEND | S_NOATIME | S_DIRSYNC);
-+
-+	if (flags & EXT3_IMMUTABLE_FL)
-+		inode->i_flags |= S_IMMUTABLE;
-+	if (flags & EXT3_IXUNLINK_FL)
-+		inode->i_flags |= S_IXUNLINK;
-+
- 	if (flags & EXT3_SYNC_FL)
- 		inode->i_flags |= S_SYNC;
- 	if (flags & EXT3_APPEND_FL)
- 		inode->i_flags |= S_APPEND;
--	if (flags & EXT3_IMMUTABLE_FL)
--		inode->i_flags |= S_IMMUTABLE;
- 	if (flags & EXT3_NOATIME_FL)
- 		inode->i_flags |= S_NOATIME;
- 	if (flags & EXT3_DIRSYNC_FL)
- 		inode->i_flags |= S_DIRSYNC;
-+
-+	inode->i_vflags &= ~(V_BARRIER | V_COW);
-+
-+	if (flags & EXT3_BARRIER_FL)
-+		inode->i_vflags |= V_BARRIER;
-+	if (flags & EXT3_COW_FL)
-+		inode->i_vflags |= V_COW;
- }
- 
- /* Propagate flags from i_flags to EXT3_I(inode)->i_flags */
- void ext3_get_inode_flags(struct ext3_inode_info *ei)
- {
- 	unsigned int flags = ei->vfs_inode.i_flags;
-+	unsigned int vflags = ei->vfs_inode.i_vflags;
-+
-+	ei->i_flags &= ~(EXT3_SYNC_FL | EXT3_APPEND_FL |
-+			EXT3_IMMUTABLE_FL | EXT3_IXUNLINK_FL |
-+			EXT3_NOATIME_FL | EXT3_DIRSYNC_FL |
-+			EXT3_BARRIER_FL | EXT3_COW_FL);
-+
-+	if (flags & S_IMMUTABLE)
-+		ei->i_flags |= EXT3_IMMUTABLE_FL;
-+	if (flags & S_IXUNLINK)
-+		ei->i_flags |= EXT3_IXUNLINK_FL;
- 
--	ei->i_flags &= ~(EXT3_SYNC_FL|EXT3_APPEND_FL|
--			EXT3_IMMUTABLE_FL|EXT3_NOATIME_FL|EXT3_DIRSYNC_FL);
- 	if (flags & S_SYNC)
- 		ei->i_flags |= EXT3_SYNC_FL;
- 	if (flags & S_APPEND)
- 		ei->i_flags |= EXT3_APPEND_FL;
--	if (flags & S_IMMUTABLE)
--		ei->i_flags |= EXT3_IMMUTABLE_FL;
- 	if (flags & S_NOATIME)
- 		ei->i_flags |= EXT3_NOATIME_FL;
- 	if (flags & S_DIRSYNC)
- 		ei->i_flags |= EXT3_DIRSYNC_FL;
-+
-+	if (vflags & V_BARRIER)
-+		ei->i_flags |= EXT3_BARRIER_FL;
-+	if (vflags & V_COW)
-+		ei->i_flags |= EXT3_COW_FL;
- }
- 
- struct inode *ext3_iget(struct super_block *sb, unsigned long ino)
-@@ -2880,8 +2906,10 @@ struct inode *ext3_iget(struct super_blo
- 		i_uid |= le16_to_cpu(raw_inode->i_uid_high) << 16;
- 		i_gid |= le16_to_cpu(raw_inode->i_gid_high) << 16;
- 	}
--	i_uid_write(inode, i_uid);
--	i_gid_write(inode, i_gid);
-+	i_uid_write(inode, INOTAG_UID(DX_TAG(inode), i_uid, i_gid));
-+	i_gid_write(inode, INOTAG_GID(DX_TAG(inode), i_uid, i_gid));
-+	i_tag_write(inode, INOTAG_TAG(DX_TAG(inode), i_uid, i_gid,
-+		le16_to_cpu(raw_inode->i_raw_tag)));
- 	set_nlink(inode, le16_to_cpu(raw_inode->i_links_count));
- 	inode->i_size = le32_to_cpu(raw_inode->i_size);
- 	inode->i_atime.tv_sec = (signed)le32_to_cpu(raw_inode->i_atime);
-@@ -3053,8 +3081,10 @@ again:
- 
- 	ext3_get_inode_flags(ei);
- 	raw_inode->i_mode = cpu_to_le16(inode->i_mode);
--	i_uid = i_uid_read(inode);
--	i_gid = i_gid_read(inode);
-+	i_uid = from_kuid(&init_user_ns,
-+		TAGINO_KUID(DX_TAG(inode), inode->i_uid, inode->i_tag));
-+	i_gid = from_kgid(&init_user_ns,
-+		TAGINO_KGID(DX_TAG(inode), inode->i_gid, inode->i_tag));
- 	if(!(test_opt(inode->i_sb, NO_UID32))) {
- 		raw_inode->i_uid_low = cpu_to_le16(low_16_bits(i_uid));
- 		raw_inode->i_gid_low = cpu_to_le16(low_16_bits(i_gid));
-@@ -3079,6 +3109,9 @@ again:
- 		raw_inode->i_uid_high = 0;
- 		raw_inode->i_gid_high = 0;
- 	}
-+#ifdef CONFIG_TAGGING_INTERN
-+	raw_inode->i_raw_tag = cpu_to_le16(i_tag_read(inode));
-+#endif
- 	raw_inode->i_links_count = cpu_to_le16(inode->i_nlink);
- 	disksize = cpu_to_le32(ei->i_disksize);
- 	if (disksize != raw_inode->i_size) {
-@@ -3251,7 +3284,8 @@ int ext3_setattr(struct dentry *dentry,
- 	if (is_quota_modification(inode, attr))
- 		dquot_initialize(inode);
- 	if ((ia_valid & ATTR_UID && !uid_eq(attr->ia_uid, inode->i_uid)) ||
--	    (ia_valid & ATTR_GID && !gid_eq(attr->ia_gid, inode->i_gid))) {
-+	    (ia_valid & ATTR_GID && !gid_eq(attr->ia_gid, inode->i_gid)) ||
-+	    (ia_valid & ATTR_TAG && !tag_eq(attr->ia_tag, inode->i_tag))) {
- 		handle_t *handle;
- 
- 		/* (user+group)*(old+new) structure, inode write (sb,
-@@ -3273,6 +3307,8 @@ int ext3_setattr(struct dentry *dentry,
- 			inode->i_uid = attr->ia_uid;
- 		if (attr->ia_valid & ATTR_GID)
- 			inode->i_gid = attr->ia_gid;
-+		if ((attr->ia_valid & ATTR_TAG) && IS_TAGGED(inode))
-+			inode->i_tag = attr->ia_tag;
- 		error = ext3_mark_inode_dirty(handle, inode);
- 		ext3_journal_stop(handle);
- 	}
-diff -NurpP --minimal linux-3.18.5/fs/ext3/ioctl.c linux-3.18.5-vs2.3.7.3/fs/ext3/ioctl.c
---- linux-3.18.5/fs/ext3/ioctl.c	2013-05-31 13:45:23.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/ext3/ioctl.c	2015-01-19 10:57:47.000000000 +0000
-@@ -12,6 +12,34 @@
- #include <asm/uaccess.h>
- #include "ext3.h"
- 
-+
-+int ext3_sync_flags(struct inode *inode, int flags, int vflags)
-+{
-+	handle_t *handle = NULL;
-+	struct ext3_iloc iloc;
-+	int err;
-+
-+	handle = ext3_journal_start(inode, 1);
-+	if (IS_ERR(handle))
-+		return PTR_ERR(handle);
-+
-+	if (IS_SYNC(inode))
-+		handle->h_sync = 1;
-+	err = ext3_reserve_inode_write(handle, inode, &iloc);
-+	if (err)
-+		goto flags_err;
-+
-+	inode->i_flags = flags;
-+	inode->i_vflags = vflags;
-+	ext3_get_inode_flags(EXT3_I(inode));
-+	inode->i_ctime = CURRENT_TIME_SEC;
-+
-+	err = ext3_mark_iloc_dirty(handle, inode, &iloc);
-+flags_err:
-+	ext3_journal_stop(handle);
-+	return err;
-+}
-+
- long ext3_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
- {
- 	struct inode *inode = file_inode(filp);
-@@ -45,6 +73,11 @@ long ext3_ioctl(struct file *filp, unsig
- 
- 		flags = ext3_mask_flags(inode->i_mode, flags);
- 
-+		if (IS_BARRIER(inode)) {
-+			vxwprintk_task(1, "messing with the barrier.");
-+			return -EACCES;
-+		}
-+
- 		mutex_lock(&inode->i_mutex);
- 
- 		/* Is it quota file? Do not allow user to mess with it */
-@@ -63,7 +96,9 @@ long ext3_ioctl(struct file *filp, unsig
- 		 *
- 		 * This test looks nicer. Thanks to Pauline Middelink
- 		 */
--		if ((flags ^ oldflags) & (EXT3_APPEND_FL | EXT3_IMMUTABLE_FL)) {
-+		if ((oldflags & EXT3_IMMUTABLE_FL) ||
-+			((flags ^ oldflags) & (EXT3_APPEND_FL |
-+			EXT3_IMMUTABLE_FL | EXT3_IXUNLINK_FL))) {
- 			if (!capable(CAP_LINUX_IMMUTABLE))
- 				goto flags_out;
- 		}
-@@ -88,7 +123,7 @@ long ext3_ioctl(struct file *filp, unsig
- 		if (err)
- 			goto flags_err;
- 
--		flags = flags & EXT3_FL_USER_MODIFIABLE;
-+		flags &= EXT3_FL_USER_MODIFIABLE;
- 		flags |= oldflags & ~EXT3_FL_USER_MODIFIABLE;
- 		ei->i_flags = flags;
- 
-diff -NurpP --minimal linux-3.18.5/fs/ext3/namei.c linux-3.18.5-vs2.3.7.3/fs/ext3/namei.c
---- linux-3.18.5/fs/ext3/namei.c	2014-06-12 11:34:57.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/ext3/namei.c	2015-01-19 10:57:47.000000000 +0000
-@@ -25,6 +25,8 @@
-  */
- 
- #include <linux/quotaops.h>
-+#include <linux/vs_tag.h>
-+
- #include "ext3.h"
- #include "namei.h"
- #include "xattr.h"
-@@ -915,6 +917,7 @@ restart:
- 					submit_bh(READ | REQ_META | REQ_PRIO,
- 						  bh);
- 				}
-+		dx_propagate_tag(nd, inode);
- 			}
- 		}
- 		if ((bh = bh_use[ra_ptr++]) == NULL)
-@@ -2568,6 +2571,7 @@ const struct inode_operations ext3_dir_i
- 	.listxattr	= ext3_listxattr,
- 	.removexattr	= generic_removexattr,
- #endif
-+	.sync_flags	= ext3_sync_flags,
- 	.get_acl	= ext3_get_acl,
- 	.set_acl	= ext3_set_acl,
- };
-diff -NurpP --minimal linux-3.18.5/fs/ext3/super.c linux-3.18.5-vs2.3.7.3/fs/ext3/super.c
---- linux-3.18.5/fs/ext3/super.c	2015-01-17 02:40:17.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/ext3/super.c	2015-01-19 10:57:47.000000000 +0000
-@@ -826,7 +826,8 @@ enum {
- 	Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
- 	Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_jqfmt_vfsv1, Opt_quota,
- 	Opt_noquota, Opt_ignore, Opt_barrier, Opt_nobarrier, Opt_err,
--	Opt_resize, Opt_usrquota, Opt_grpquota
-+	Opt_resize, Opt_usrquota, Opt_grpquota,
-+	Opt_tag, Opt_notag, Opt_tagid
- };
- 
- static const match_table_t tokens = {
-@@ -884,6 +885,9 @@ static const match_table_t tokens = {
- 	{Opt_barrier, "barrier"},
- 	{Opt_nobarrier, "nobarrier"},
- 	{Opt_resize, "resize"},
-+	{Opt_tag, "tag"},
-+	{Opt_notag, "notag"},
-+	{Opt_tagid, "tagid=%u"},
- 	{Opt_err, NULL},
- };
- 
-@@ -1056,6 +1060,20 @@ static int parse_options (char *options,
- 		case Opt_nouid32:
- 			set_opt (sbi->s_mount_opt, NO_UID32);
- 			break;
-+#ifndef CONFIG_TAGGING_NONE
-+		case Opt_tag:
-+			set_opt (sbi->s_mount_opt, TAGGED);
-+			break;
-+		case Opt_notag:
-+			clear_opt (sbi->s_mount_opt, TAGGED);
-+			break;
-+#endif
-+#ifdef CONFIG_PROPAGATE
-+		case Opt_tagid:
-+			/* use args[0] */
-+			set_opt (sbi->s_mount_opt, TAGGED);
-+			break;
-+#endif
- 		case Opt_nocheck:
- 			clear_opt (sbi->s_mount_opt, CHECK);
- 			break;
-@@ -1781,6 +1799,9 @@ static int ext3_fill_super (struct super
- 			    NULL, 0))
- 		goto failed_mount;
- 
-+	if (EXT3_SB(sb)->s_mount_opt & EXT3_MOUNT_TAGGED)
-+		sb->s_flags |= MS_TAGGED;
-+
- 	sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
- 		(test_opt(sb, POSIX_ACL) ? MS_POSIXACL : 0);
- 
-@@ -2678,6 +2699,14 @@ static int ext3_remount (struct super_bl
- 	if (test_opt(sb, ABORT))
- 		ext3_abort(sb, __func__, "Abort forced by user");
- 
-+	if ((sbi->s_mount_opt & EXT3_MOUNT_TAGGED) &&
-+		!(sb->s_flags & MS_TAGGED)) {
-+		printk("EXT3-fs: %s: tagging not permitted on remount.\n",
-+			sb->s_id);
-+		err = -EINVAL;
-+		goto restore_opts;
-+	}
-+
- 	sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
- 		(test_opt(sb, POSIX_ACL) ? MS_POSIXACL : 0);
- 
-diff -NurpP --minimal linux-3.18.5/fs/ext4/ext4.h linux-3.18.5-vs2.3.7.3/fs/ext4/ext4.h
---- linux-3.18.5/fs/ext4/ext4.h	2015-01-17 02:40:17.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/ext4/ext4.h	2015-01-19 10:57:47.000000000 +0000
-@@ -385,7 +385,10 @@ struct flex_groups {
+diff -NurpP --minimal linux-4.4.110/fs/ext4/ext4.h linux-4.4.110-vs2.3.9/fs/ext4/ext4.h
+--- linux-4.4.110/fs/ext4/ext4.h	2018-01-09 16:35:06.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/ext4/ext4.h	2018-01-09 17:33:10.000000000 +0000
+@@ -375,8 +375,11 @@ struct flex_groups {
  #define EXT4_EXTENTS_FL			0x00080000 /* Inode uses extents */
  #define EXT4_EA_INODE_FL	        0x00200000 /* Inode used for large EA */
  #define EXT4_EOFBLOCKS_FL		0x00400000 /* Blocks allocated beyond EOF */
 +#define EXT4_BARRIER_FL			0x04000000 /* Barrier for chroot() */
 +#define EXT4_IXUNLINK_FL		0x08000000 /* Immutable invert on unlink */
  #define EXT4_INLINE_DATA_FL		0x10000000 /* Inode has inline data. */
-+#define EXT4_COW_FL			0x20000000 /* Copy on Write marker */
+ #define EXT4_PROJINHERIT_FL		0x20000000 /* Create with parents projid */
++#define EXT4_COW_FL			0x40000000 /* Copy on Write marker */
  #define EXT4_RESERVED_FL		0x80000000 /* reserved for ext4 lib */
  
  #define EXT4_FL_USER_VISIBLE		0x004BDFFF /* User visible flags */
-@@ -671,7 +674,7 @@ struct ext4_inode {
+@@ -674,7 +677,7 @@ struct ext4_inode {
  			__le16	l_i_uid_high;	/* these 2 fields */
  			__le16	l_i_gid_high;	/* were reserved2[0] */
  			__le16	l_i_checksum_lo;/* crc32c(uuid+inum+inode) LE */
@@ -2901,7 +2558,7 @@ diff -NurpP --minimal linux-3.18.5/fs/ext4/ext4.h linux-3.18.5-vs2.3.7.3/fs/ext4
  		} linux2;
  		struct {
  			__le16	h_i_reserved1;	/* Obsoleted fragment number/size which are removed in ext4 */
-@@ -791,6 +794,7 @@ do {									       \
+@@ -831,6 +834,7 @@ do {									       \
  #define i_gid_low	i_gid
  #define i_uid_high	osd2.linux2.l_i_uid_high
  #define i_gid_high	osd2.linux2.l_i_gid_high
@@ -2909,7 +2566,7 @@ diff -NurpP --minimal linux-3.18.5/fs/ext4/ext4.h linux-3.18.5-vs2.3.7.3/fs/ext4
  #define i_checksum_lo	osd2.linux2.l_i_checksum_lo
  
  #elif defined(__GNU__)
-@@ -980,6 +984,7 @@ struct ext4_inode_info {
+@@ -1068,6 +1072,7 @@ struct ext4_inode_info {
  #define EXT4_MOUNT_POSIX_ACL		0x08000	/* POSIX Access Control Lists */
  #define EXT4_MOUNT_NO_AUTO_DA_ALLOC	0x10000	/* No auto delalloc mapping */
  #define EXT4_MOUNT_BARRIER		0x20000 /* Use block barriers */
@@ -2917,28 +2574,28 @@ diff -NurpP --minimal linux-3.18.5/fs/ext4/ext4.h linux-3.18.5-vs2.3.7.3/fs/ext4
  #define EXT4_MOUNT_QUOTA		0x80000 /* Some quota option set */
  #define EXT4_MOUNT_USRQUOTA		0x100000 /* "old" user quota */
  #define EXT4_MOUNT_GRPQUOTA		0x200000 /* "old" group quota */
-@@ -2644,6 +2649,7 @@ extern struct buffer_head *ext4_get_firs
- extern int ext4_inline_data_fiemap(struct inode *inode,
- 				   struct fiemap_extent_info *fieinfo,
- 				   int *has_inline);
+@@ -2501,6 +2506,7 @@ extern int ext4_punch_hole(struct inode
+ extern int ext4_truncate_restart_trans(handle_t *, struct inode *, int nblocks);
+ extern void ext4_set_inode_flags(struct inode *);
+ extern void ext4_get_inode_flags(struct ext4_inode_info *);
 +extern int ext4_sync_flags(struct inode *, int, int);
- extern int ext4_try_to_evict_inline_data(handle_t *handle,
- 					 struct inode *inode,
- 					 int needed);
-diff -NurpP --minimal linux-3.18.5/fs/ext4/file.c linux-3.18.5-vs2.3.7.3/fs/ext4/file.c
---- linux-3.18.5/fs/ext4/file.c	2015-01-17 02:40:17.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/ext4/file.c	2015-01-19 10:57:47.000000000 +0000
-@@ -610,5 +610,6 @@ const struct inode_operations ext4_file_
+ extern int ext4_alloc_da_blocks(struct inode *inode);
+ extern void ext4_set_aops(struct inode *inode);
+ extern int ext4_writepage_trans_blocks(struct inode *);
+diff -NurpP --minimal linux-4.4.110/fs/ext4/file.c linux-4.4.110-vs2.3.9/fs/ext4/file.c
+--- linux-4.4.110/fs/ext4/file.c	2018-01-09 16:35:06.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/ext4/file.c	2018-01-09 16:36:31.000000000 +0000
+@@ -749,5 +749,6 @@ const struct inode_operations ext4_file_
  	.get_acl	= ext4_get_acl,
  	.set_acl	= ext4_set_acl,
  	.fiemap		= ext4_fiemap,
 +	.sync_flags	= ext4_sync_flags,
  };
  
-diff -NurpP --minimal linux-3.18.5/fs/ext4/ialloc.c linux-3.18.5-vs2.3.7.3/fs/ext4/ialloc.c
---- linux-3.18.5/fs/ext4/ialloc.c	2015-01-17 02:40:17.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/ext4/ialloc.c	2015-01-19 10:57:47.000000000 +0000
-@@ -22,6 +22,7 @@
+diff -NurpP --minimal linux-4.4.110/fs/ext4/ialloc.c linux-4.4.110-vs2.3.9/fs/ext4/ialloc.c
+--- linux-4.4.110/fs/ext4/ialloc.c	2018-01-09 16:35:06.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/ext4/ialloc.c	2018-01-09 16:36:31.000000000 +0000
+@@ -21,6 +21,7 @@
  #include <linux/random.h>
  #include <linux/bitops.h>
  #include <linux/blkdev.h>
@@ -2946,26 +2603,26 @@ diff -NurpP --minimal linux-3.18.5/fs/ext4/ialloc.c linux-3.18.5-vs2.3.7.3/fs/ex
  #include <asm/byteorder.h>
  
  #include "ext4.h"
-@@ -754,6 +755,7 @@ struct inode *__ext4_new_inode(handle_t
+@@ -799,6 +800,7 @@ struct inode *__ext4_new_inode(handle_t
  		inode->i_mode = mode;
  		inode->i_uid = current_fsuid();
  		inode->i_gid = dir->i_gid;
 +		i_tag_write(inode, dx_current_fstag(sb));
  	} else
  		inode_init_owner(inode, dir, mode);
- 	dquot_initialize(inode);
-diff -NurpP --minimal linux-3.18.5/fs/ext4/inode.c linux-3.18.5-vs2.3.7.3/fs/ext4/inode.c
---- linux-3.18.5/fs/ext4/inode.c	2015-01-17 02:40:17.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/ext4/inode.c	2015-01-19 12:50:18.000000000 +0000
-@@ -39,6 +39,7 @@
- #include <linux/ratelimit.h>
- #include <linux/aio.h>
+ 	err = dquot_initialize(inode);
+diff -NurpP --minimal linux-4.4.110/fs/ext4/inode.c linux-4.4.110-vs2.3.9/fs/ext4/inode.c
+--- linux-4.4.110/fs/ext4/inode.c	2018-01-09 16:35:06.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/ext4/inode.c	2018-01-09 16:36:31.000000000 +0000
+@@ -37,6 +37,7 @@
+ #include <linux/printk.h>
+ #include <linux/slab.h>
  #include <linux/bitops.h>
 +#include <linux/vs_tag.h>
  
  #include "ext4_jbd2.h"
  #include "xattr.h"
-@@ -3811,42 +3812,66 @@ void ext4_set_inode_flags(struct inode *
+@@ -4128,12 +4129,15 @@ void ext4_set_inode_flags(struct inode *
  	unsigned int flags = EXT4_I(inode)->i_flags;
  	unsigned int new_fl = 0;
  
@@ -2983,10 +2640,12 @@ diff -NurpP --minimal linux-3.18.5/fs/ext4/inode.c linux-3.18.5-vs2.3.7.3/fs/ext
  	if (flags & EXT4_NOATIME_FL)
  		new_fl |= S_NOATIME;
  	if (flags & EXT4_DIRSYNC_FL)
- 		new_fl |= S_DIRSYNC;
+@@ -4141,31 +4145,52 @@ void ext4_set_inode_flags(struct inode *
+ 	if (test_opt(inode->i_sb, DAX))
+ 		new_fl |= S_DAX;
  	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_IMMUTABLE|S_NOATIME|S_DIRSYNC|S_DAX);
++		S_IXUNLINK | S_IMMUTABLE | S_DAX |
 +		S_SYNC | S_APPEND | S_NOATIME | S_DIRSYNC);
 +
 +	new_fl = 0;
@@ -3039,7 +2698,7 @@ diff -NurpP --minimal linux-3.18.5/fs/ext4/inode.c linux-3.18.5-vs2.3.7.3/fs/ext
  	} while (cmpxchg(&ei->i_flags, old_fl, new_fl) != old_fl);
  }
  
-@@ -3950,8 +3975,10 @@ struct inode *ext4_iget(struct super_blo
+@@ -4269,8 +4294,10 @@ struct inode *ext4_iget(struct super_blo
  		i_uid |= le16_to_cpu(raw_inode->i_uid_high) << 16;
  		i_gid |= le16_to_cpu(raw_inode->i_gid_high) << 16;
  	}
@@ -3052,7 +2711,7 @@ diff -NurpP --minimal linux-3.18.5/fs/ext4/inode.c linux-3.18.5-vs2.3.7.3/fs/ext
  	set_nlink(inode, le16_to_cpu(raw_inode->i_links_count));
  
  	ext4_clear_state_flags(ei);	/* Only relevant on 32-bit archs */
-@@ -4191,8 +4218,10 @@ static int ext4_do_update_inode(handle_t
+@@ -4583,8 +4610,10 @@ static int ext4_do_update_inode(handle_t
  
  	ext4_get_inode_flags(ei);
  	raw_inode->i_mode = cpu_to_le16(inode->i_mode);
@@ -3065,7 +2724,7 @@ diff -NurpP --minimal linux-3.18.5/fs/ext4/inode.c linux-3.18.5-vs2.3.7.3/fs/ext
  	if (!(test_opt(inode->i_sb, NO_UID32))) {
  		raw_inode->i_uid_low = cpu_to_le16(low_16_bits(i_uid));
  		raw_inode->i_gid_low = cpu_to_le16(low_16_bits(i_gid));
-@@ -4215,6 +4244,9 @@ static int ext4_do_update_inode(handle_t
+@@ -4607,6 +4636,9 @@ static int ext4_do_update_inode(handle_t
  		raw_inode->i_uid_high = 0;
  		raw_inode->i_gid_high = 0;
  	}
@@ -3075,9 +2734,9 @@ diff -NurpP --minimal linux-3.18.5/fs/ext4/inode.c linux-3.18.5-vs2.3.7.3/fs/ext
  	raw_inode->i_links_count = cpu_to_le16(inode->i_nlink);
  
  	EXT4_INODE_SET_XTIME(i_ctime, inode, raw_inode);
-@@ -4458,7 +4490,8 @@ int ext4_setattr(struct dentry *dentry,
- 	if (is_quota_modification(inode, attr))
- 		dquot_initialize(inode);
+@@ -4852,7 +4884,8 @@ int ext4_setattr(struct dentry *dentry,
+ 			return error;
+ 	}
  	if ((ia_valid & ATTR_UID && !uid_eq(attr->ia_uid, inode->i_uid)) ||
 -	    (ia_valid & ATTR_GID && !gid_eq(attr->ia_gid, inode->i_gid))) {
 +	    (ia_valid & ATTR_GID && !gid_eq(attr->ia_gid, inode->i_gid)) ||
@@ -3085,7 +2744,7 @@ diff -NurpP --minimal linux-3.18.5/fs/ext4/inode.c linux-3.18.5-vs2.3.7.3/fs/ext
  		handle_t *handle;
  
  		/* (user+group)*(old+new) structure, inode write (sb,
-@@ -4481,6 +4514,8 @@ int ext4_setattr(struct dentry *dentry,
+@@ -4875,6 +4908,8 @@ int ext4_setattr(struct dentry *dentry,
  			inode->i_uid = attr->ia_uid;
  		if (attr->ia_valid & ATTR_GID)
  			inode->i_gid = attr->ia_gid;
@@ -3094,19 +2753,19 @@ diff -NurpP --minimal linux-3.18.5/fs/ext4/inode.c linux-3.18.5-vs2.3.7.3/fs/ext
  		error = ext4_mark_inode_dirty(handle, inode);
  		ext4_journal_stop(handle);
  	}
-diff -NurpP --minimal linux-3.18.5/fs/ext4/ioctl.c linux-3.18.5-vs2.3.7.3/fs/ext4/ioctl.c
---- linux-3.18.5/fs/ext4/ioctl.c	2015-01-17 02:40:17.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/ext4/ioctl.c	2015-01-19 10:57:47.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/ext4/ioctl.c linux-4.4.110-vs2.3.9/fs/ext4/ioctl.c
+--- linux-4.4.110/fs/ext4/ioctl.c	2018-01-09 16:35:06.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/ext4/ioctl.c	2018-01-09 16:36:31.000000000 +0000
 @@ -14,6 +14,7 @@
- #include <linux/compat.h>
  #include <linux/mount.h>
  #include <linux/file.h>
+ #include <linux/random.h>
 +#include <linux/vs_tag.h>
  #include <asm/uaccess.h>
  #include "ext4_jbd2.h"
  #include "ext4.h"
-@@ -198,6 +199,33 @@ journal_err_out:
- 	return err;
+@@ -202,6 +203,33 @@ static int uuid_is_zero(__u8 u[16])
+ 	return 1;
  }
  
 +int ext4_sync_flags(struct inode *inode, int flags, int vflags)
@@ -3139,7 +2798,7 @@ diff -NurpP --minimal linux-3.18.5/fs/ext4/ioctl.c linux-3.18.5-vs2.3.7.3/fs/ext
  long ext4_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
  {
  	struct inode *inode = file_inode(filp);
-@@ -231,6 +259,11 @@ long ext4_ioctl(struct file *filp, unsig
+@@ -235,6 +263,11 @@ long ext4_ioctl(struct file *filp, unsig
  
  		flags = ext4_mask_flags(inode->i_mode, flags);
  
@@ -3151,7 +2810,7 @@ diff -NurpP --minimal linux-3.18.5/fs/ext4/ioctl.c linux-3.18.5-vs2.3.7.3/fs/ext
  		err = -EPERM;
  		mutex_lock(&inode->i_mutex);
  		/* Is it quota file? Do not allow user to mess with it */
-@@ -248,7 +281,9 @@ long ext4_ioctl(struct file *filp, unsig
+@@ -252,7 +285,9 @@ long ext4_ioctl(struct file *filp, unsig
  		 *
  		 * This test looks nicer. Thanks to Pauline Middelink
  		 */
@@ -3162,10 +2821,10 @@ diff -NurpP --minimal linux-3.18.5/fs/ext4/ioctl.c linux-3.18.5-vs2.3.7.3/fs/ext
  			if (!capable(CAP_LINUX_IMMUTABLE))
  				goto flags_out;
  		}
-diff -NurpP --minimal linux-3.18.5/fs/ext4/namei.c linux-3.18.5-vs2.3.7.3/fs/ext4/namei.c
---- linux-3.18.5/fs/ext4/namei.c	2015-01-17 02:40:17.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/ext4/namei.c	2015-01-19 10:57:47.000000000 +0000
-@@ -34,6 +34,7 @@
+diff -NurpP --minimal linux-4.4.110/fs/ext4/namei.c linux-4.4.110-vs2.3.9/fs/ext4/namei.c
+--- linux-4.4.110/fs/ext4/namei.c	2018-01-09 16:35:06.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/ext4/namei.c	2018-01-09 16:36:31.000000000 +0000
+@@ -33,6 +33,7 @@
  #include <linux/quotaops.h>
  #include <linux/buffer_head.h>
  #include <linux/bio.h>
@@ -3173,7 +2832,7 @@ diff -NurpP --minimal linux-3.18.5/fs/ext4/namei.c linux-3.18.5-vs2.3.7.3/fs/ext
  #include "ext4.h"
  #include "ext4_jbd2.h"
  
-@@ -1279,6 +1280,7 @@ restart:
+@@ -1444,6 +1445,7 @@ restart:
  					ll_rw_block(READ | REQ_META | REQ_PRIO,
  						    1, &bh);
  			}
@@ -3181,7 +2840,7 @@ diff -NurpP --minimal linux-3.18.5/fs/ext4/namei.c linux-3.18.5-vs2.3.7.3/fs/ext
  		}
  		if ((bh = bh_use[ra_ptr++]) == NULL)
  			goto next;
-@@ -3539,6 +3541,7 @@ const struct inode_operations ext4_dir_i
+@@ -3881,6 +3883,7 @@ const struct inode_operations ext4_dir_i
  	.get_acl	= ext4_get_acl,
  	.set_acl	= ext4_set_acl,
  	.fiemap         = ext4_fiemap,
@@ -3189,19 +2848,18 @@ diff -NurpP --minimal linux-3.18.5/fs/ext4/namei.c linux-3.18.5-vs2.3.7.3/fs/ext
  };
  
  const struct inode_operations ext4_special_inode_operations = {
-diff -NurpP --minimal linux-3.18.5/fs/ext4/super.c linux-3.18.5-vs2.3.7.3/fs/ext4/super.c
---- linux-3.18.5/fs/ext4/super.c	2015-01-17 02:40:17.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/ext4/super.c	2015-01-19 10:57:47.000000000 +0000
-@@ -1146,7 +1146,7 @@ enum {
- 	Opt_inode_readahead_blks, Opt_journal_ioprio,
+diff -NurpP --minimal linux-4.4.110/fs/ext4/super.c linux-4.4.110-vs2.3.9/fs/ext4/super.c
+--- linux-4.4.110/fs/ext4/super.c	2018-01-09 16:35:06.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/ext4/super.c	2018-01-09 16:36:32.000000000 +0000
+@@ -1165,6 +1165,7 @@ enum {
  	Opt_dioread_nolock, Opt_dioread_lock,
  	Opt_discard, Opt_nodiscard, Opt_init_itable, Opt_noinit_itable,
--	Opt_max_dir_size_kb,
-+	Opt_max_dir_size_kb, Opt_tag, Opt_notag, Opt_tagid
+ 	Opt_max_dir_size_kb, Opt_nojournal_checksum,
++	Opt_tag, Opt_notag, Opt_tagid
  };
  
  static const match_table_t tokens = {
-@@ -1227,6 +1227,9 @@ static const match_table_t tokens = {
+@@ -1250,6 +1251,9 @@ static const match_table_t tokens = {
  	{Opt_removed, "reservation"},	/* mount option from ext2/3 */
  	{Opt_removed, "noreservation"}, /* mount option from ext2/3 */
  	{Opt_removed, "journal=%u"},	/* mount option from ext2/3 */
@@ -3211,9 +2869,9 @@ diff -NurpP --minimal linux-3.18.5/fs/ext4/super.c linux-3.18.5-vs2.3.7.3/fs/ext
  	{Opt_err, NULL},
  };
  
-@@ -1459,6 +1462,20 @@ static int handle_mount_opt(struct super
- 	case Opt_i_version:
- 		sb->s_flags |= MS_I_VERSION;
+@@ -1492,6 +1496,20 @@ static int handle_mount_opt(struct super
+ 	case Opt_nolazytime:
+ 		sb->s_flags &= ~MS_LAZYTIME;
  		return 1;
 +#ifndef CONFIG_TAGGING_NONE
 +	case Opt_tag:
@@ -3232,8 +2890,8 @@ diff -NurpP --minimal linux-3.18.5/fs/ext4/super.c linux-3.18.5-vs2.3.7.3/fs/ext
  	}
  
  	for (m = ext4_mount_opts; m->token != Opt_err; m++)
-@@ -3600,6 +3617,9 @@ static int ext4_fill_super(struct super_
- 			clear_opt(sb, DELALLOC);
+@@ -3379,6 +3397,9 @@ static int ext4_fill_super(struct super_
+ 		sb->s_iflags |= SB_I_CGROUPWB;
  	}
  
 +	if (EXT4_SB(sb)->s_mount_opt & EXT4_MOUNT_TAGGED)
@@ -3242,7 +2900,7 @@ diff -NurpP --minimal linux-3.18.5/fs/ext4/super.c linux-3.18.5-vs2.3.7.3/fs/ext
  	sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
  		(test_opt(sb, POSIX_ACL) ? MS_POSIXACL : 0);
  
-@@ -4872,6 +4892,14 @@ static int ext4_remount(struct super_blo
+@@ -4727,6 +4748,14 @@ static int ext4_remount(struct super_blo
  	if (sbi->s_mount_flags & EXT4_MF_FS_ABORTED)
  		ext4_abort(sb, "Abort forced by user");
  
@@ -3257,9 +2915,9 @@ diff -NurpP --minimal linux-3.18.5/fs/ext4/super.c linux-3.18.5-vs2.3.7.3/fs/ext
  	sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
  		(test_opt(sb, POSIX_ACL) ? MS_POSIXACL : 0);
  
-diff -NurpP --minimal linux-3.18.5/fs/fcntl.c linux-3.18.5-vs2.3.7.3/fs/fcntl.c
---- linux-3.18.5/fs/fcntl.c	2015-01-17 02:40:17.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/fcntl.c	2015-01-19 11:48:08.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/fcntl.c linux-4.4.110-vs2.3.9/fs/fcntl.c
+--- linux-4.4.110/fs/fcntl.c	2018-01-09 16:35:06.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/fcntl.c	2018-01-09 16:36:32.000000000 +0000
 @@ -22,6 +22,7 @@
  #include <linux/pid_namespace.h>
  #include <linux/user_namespace.h>
@@ -3277,9 +2935,9 @@ diff -NurpP --minimal linux-3.18.5/fs/fcntl.c linux-3.18.5-vs2.3.7.3/fs/fcntl.c
  
  	if (unlikely(f.file->f_mode & FMODE_PATH)) {
  		if (!check_fcntl_cmd(cmd))
-diff -NurpP --minimal linux-3.18.5/fs/file.c linux-3.18.5-vs2.3.7.3/fs/file.c
---- linux-3.18.5/fs/file.c	2015-01-17 02:40:17.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/file.c	2015-01-19 10:57:47.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/file.c linux-4.4.110-vs2.3.9/fs/file.c
+--- linux-4.4.110/fs/file.c	2016-07-05 04:15:07.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/file.c	2018-01-09 16:36:32.000000000 +0000
 @@ -22,6 +22,7 @@
  #include <linux/spinlock.h>
  #include <linux/rcupdate.h>
@@ -3288,7 +2946,7 @@ diff -NurpP --minimal linux-3.18.5/fs/file.c linux-3.18.5-vs2.3.7.3/fs/file.c
  
  int sysctl_nr_open __read_mostly = 1024*1024;
  int sysctl_nr_open_min = BITS_PER_LONG;
-@@ -309,6 +310,8 @@ struct files_struct *dup_fd(struct files
+@@ -356,6 +357,8 @@ struct files_struct *dup_fd(struct files
  		struct file *f = *old_fds++;
  		if (f) {
  			get_file(f);
@@ -3297,7 +2955,7 @@ diff -NurpP --minimal linux-3.18.5/fs/file.c linux-3.18.5-vs2.3.7.3/fs/file.c
  		} else {
  			/*
  			 * The fd may be claimed in the fd bitmap but not yet
-@@ -369,9 +372,11 @@ static struct fdtable *close_files(struc
+@@ -405,9 +408,11 @@ static struct fdtable *close_files(struc
  					filp_close(file, files);
  					cond_resched_rcu_qs();
  				}
@@ -3309,7 +2967,7 @@ diff -NurpP --minimal linux-3.18.5/fs/file.c linux-3.18.5-vs2.3.7.3/fs/file.c
  		}
  	}
  
-@@ -487,6 +492,7 @@ repeat:
+@@ -538,6 +543,7 @@ repeat:
  	else
  		__clear_close_on_exec(fd, fdt);
  	error = fd;
@@ -3317,7 +2975,7 @@ diff -NurpP --minimal linux-3.18.5/fs/file.c linux-3.18.5-vs2.3.7.3/fs/file.c
  #if 1
  	/* Sanity check */
  	if (rcu_access_pointer(fdt->fd[fd]) != NULL) {
-@@ -517,6 +523,7 @@ static void __put_unused_fd(struct files
+@@ -568,6 +574,7 @@ static void __put_unused_fd(struct files
  	__clear_open_fd(fd, fdt);
  	if (fd < files->next_fd)
  		files->next_fd = fd;
@@ -3325,7 +2983,7 @@ diff -NurpP --minimal linux-3.18.5/fs/file.c linux-3.18.5-vs2.3.7.3/fs/file.c
  }
  
  void put_unused_fd(unsigned int fd)
-@@ -784,6 +791,8 @@ __releases(&files->file_lock)
+@@ -850,6 +857,8 @@ __releases(&files->file_lock)
  
  	if (tofree)
  		filp_close(tofree, files);
@@ -3334,13 +2992,13 @@ diff -NurpP --minimal linux-3.18.5/fs/file.c linux-3.18.5-vs2.3.7.3/fs/file.c
  
  	return fd;
  
-diff -NurpP --minimal linux-3.18.5/fs/file_table.c linux-3.18.5-vs2.3.7.3/fs/file_table.c
---- linux-3.18.5/fs/file_table.c	2015-01-17 02:40:17.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/file_table.c	2015-01-19 12:36:42.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/file_table.c linux-4.4.110-vs2.3.9/fs/file_table.c
+--- linux-4.4.110/fs/file_table.c	2015-10-29 09:21:35.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/file_table.c	2018-01-09 17:25:51.000000000 +0000
 @@ -26,6 +26,8 @@
- #include <linux/hardirq.h>
  #include <linux/task_work.h>
  #include <linux/ima.h>
+ #include <linux/swap.h>
 +#include <linux/vs_limit.h>
 +#include <linux/vs_context.h>
  
@@ -3373,9 +3031,9 @@ diff -NurpP --minimal linux-3.18.5/fs/file_table.c linux-3.18.5-vs2.3.7.3/fs/fil
  		file_free(file);
  	}
  }
-diff -NurpP --minimal linux-3.18.5/fs/fs_struct.c linux-3.18.5-vs2.3.7.3/fs/fs_struct.c
---- linux-3.18.5/fs/fs_struct.c	2014-01-22 20:39:06.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/fs_struct.c	2015-01-19 10:57:47.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/fs_struct.c linux-4.4.110-vs2.3.9/fs/fs_struct.c
+--- linux-4.4.110/fs/fs_struct.c	2015-04-12 22:12:50.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/fs_struct.c	2018-01-09 16:36:32.000000000 +0000
 @@ -4,6 +4,7 @@
  #include <linux/path.h>
  #include <linux/slab.h>
@@ -3400,10 +3058,10 @@ diff -NurpP --minimal linux-3.18.5/fs/fs_struct.c linux-3.18.5-vs2.3.7.3/fs/fs_s
  	}
  	return fs;
  }
-diff -NurpP --minimal linux-3.18.5/fs/gfs2/file.c linux-3.18.5-vs2.3.7.3/fs/gfs2/file.c
---- linux-3.18.5/fs/gfs2/file.c	2015-01-17 02:40:17.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/gfs2/file.c	2015-01-19 10:57:47.000000000 +0000
-@@ -138,6 +138,9 @@ static const u32 fsflags_to_gfs2[32] = {
+diff -NurpP --minimal linux-4.4.110/fs/gfs2/file.c linux-4.4.110-vs2.3.9/fs/gfs2/file.c
+--- linux-4.4.110/fs/gfs2/file.c	2018-01-09 16:35:06.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/gfs2/file.c	2018-01-09 17:23:53.000000000 +0000
+@@ -137,6 +137,9 @@ static const u32 fsflags_to_gfs2[32] = {
  	[12] = GFS2_DIF_EXHASH,
  	[14] = GFS2_DIF_INHERIT_JDATA,
  	[17] = GFS2_DIF_TOPDIR,
@@ -3413,7 +3071,7 @@ diff -NurpP --minimal linux-3.18.5/fs/gfs2/file.c linux-3.18.5-vs2.3.7.3/fs/gfs2
  };
  
  static const u32 gfs2_to_fsflags[32] = {
-@@ -148,6 +151,9 @@ static const u32 gfs2_to_fsflags[32] = {
+@@ -147,6 +150,9 @@ static const u32 gfs2_to_fsflags[32] = {
  	[gfs2fl_ExHash] = FS_INDEX_FL,
  	[gfs2fl_TopLevel] = FS_TOPDIR_FL,
  	[gfs2fl_InheritJdata] = FS_JOURNAL_DATA_FL,
@@ -3423,27 +3081,26 @@ diff -NurpP --minimal linux-3.18.5/fs/gfs2/file.c linux-3.18.5-vs2.3.7.3/fs/gfs2
  };
  
  static int gfs2_get_flags(struct file *filp, u32 __user *ptr)
-@@ -178,12 +184,18 @@ void gfs2_set_inode_flags(struct inode *
+@@ -177,12 +183,17 @@ void gfs2_set_inode_flags(struct inode *
  {
  	struct gfs2_inode *ip = GFS2_I(inode);
  	unsigned int flags = inode->i_flags;
 +	unsigned int vflags = inode->i_vflags;
-+
-+	flags &= ~(S_IMMUTABLE | S_IXUNLINK |
-+		S_SYNC | S_APPEND | S_NOATIME | S_DIRSYNC | S_NOSEC);
  
 -	flags &= ~(S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC|S_NOSEC);
++	flags &= ~(S_IMMUTABLE | S_IXUNLINK |
++		S_SYNC | S_APPEND | S_NOATIME | S_DIRSYNC | S_NOSEC);
++
  	if ((ip->i_eattr == 0) && !is_sxid(inode->i_mode))
- 		inode->i_flags |= S_NOSEC;
+ 		flags |= S_NOSEC;
  	if (ip->i_diskflags & GFS2_DIF_IMMUTABLE)
  		flags |= S_IMMUTABLE;
 +	if (ip->i_diskflags & GFS2_DIF_IXUNLINK)
 +		flags |= S_IXUNLINK;
-+
  	if (ip->i_diskflags & GFS2_DIF_APPENDONLY)
  		flags |= S_APPEND;
  	if (ip->i_diskflags & GFS2_DIF_NOATIME)
-@@ -191,6 +203,43 @@ void gfs2_set_inode_flags(struct inode *
+@@ -190,6 +201,43 @@ void gfs2_set_inode_flags(struct inode *
  	if (ip->i_diskflags & GFS2_DIF_SYNC)
  		flags |= S_SYNC;
  	inode->i_flags = flags;
@@ -3487,7 +3144,7 @@ diff -NurpP --minimal linux-3.18.5/fs/gfs2/file.c linux-3.18.5-vs2.3.7.3/fs/gfs2
  }
  
  /* Flags that can be set by user space */
-@@ -304,6 +353,37 @@ static int gfs2_set_flags(struct file *f
+@@ -305,6 +353,37 @@ static int gfs2_set_flags(struct file *f
  	return do_gfs2_set_flags(filp, gfsflags, ~GFS2_DIF_JDATA);
  }
  
@@ -3525,9 +3182,9 @@ diff -NurpP --minimal linux-3.18.5/fs/gfs2/file.c linux-3.18.5-vs2.3.7.3/fs/gfs2
  static long gfs2_ioctl(struct file *filp, unsigned int cmd, unsigned long arg)
  {
  	switch(cmd) {
-diff -NurpP --minimal linux-3.18.5/fs/gfs2/inode.h linux-3.18.5-vs2.3.7.3/fs/gfs2/inode.h
---- linux-3.18.5/fs/gfs2/inode.h	2013-11-25 15:45:01.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/gfs2/inode.h	2015-01-19 10:57:47.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/gfs2/inode.h linux-4.4.110-vs2.3.9/fs/gfs2/inode.h
+--- linux-4.4.110/fs/gfs2/inode.h	2015-04-12 22:12:50.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/gfs2/inode.h	2018-01-09 16:36:32.000000000 +0000
 @@ -118,6 +118,7 @@ extern const struct file_operations gfs2
  extern const struct file_operations gfs2_dir_fops_nolock;
  
@@ -3536,9 +3193,9 @@ diff -NurpP --minimal linux-3.18.5/fs/gfs2/inode.h linux-3.18.5-vs2.3.7.3/fs/gfs
   
  #ifdef CONFIG_GFS2_FS_LOCKING_DLM
  extern const struct file_operations gfs2_file_fops;
-diff -NurpP --minimal linux-3.18.5/fs/hostfs/hostfs.h linux-3.18.5-vs2.3.7.3/fs/hostfs/hostfs.h
---- linux-3.18.5/fs/hostfs/hostfs.h	2015-01-16 22:19:18.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/hostfs/hostfs.h	2015-01-19 10:57:47.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/hostfs/hostfs.h linux-4.4.110-vs2.3.9/fs/hostfs/hostfs.h
+--- linux-4.4.110/fs/hostfs/hostfs.h	2015-07-06 20:41:42.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/hostfs/hostfs.h	2018-01-09 16:36:32.000000000 +0000
 @@ -42,6 +42,7 @@ struct hostfs_iattr {
  	unsigned short	ia_mode;
  	uid_t		ia_uid;
@@ -3547,18 +3204,18 @@ diff -NurpP --minimal linux-3.18.5/fs/hostfs/hostfs.h linux-3.18.5-vs2.3.7.3/fs/
  	loff_t		ia_size;
  	struct timespec	ia_atime;
  	struct timespec	ia_mtime;
-diff -NurpP --minimal linux-3.18.5/fs/inode.c linux-3.18.5-vs2.3.7.3/fs/inode.c
---- linux-3.18.5/fs/inode.c	2015-01-16 22:19:18.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/inode.c	2015-01-19 10:57:47.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/inode.c linux-4.4.110-vs2.3.9/fs/inode.c
+--- linux-4.4.110/fs/inode.c	2018-01-09 16:35:06.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/inode.c	2018-01-09 16:36:32.000000000 +0000
 @@ -18,6 +18,7 @@
  #include <linux/buffer_head.h> /* for inode_has_buffers */
  #include <linux/ratelimit.h>
  #include <linux/list_lru.h>
 +#include <linux/vs_tag.h>
+ #include <trace/events/writeback.h>
  #include "internal.h"
  
- /*
-@@ -129,6 +130,8 @@ int inode_init_always(struct super_block
+@@ -133,6 +134,8 @@ int inode_init_always(struct super_block
  	struct address_space *const mapping = &inode->i_data;
  
  	inode->i_sb = sb;
@@ -3567,7 +3224,7 @@ diff -NurpP --minimal linux-3.18.5/fs/inode.c linux-3.18.5-vs2.3.7.3/fs/inode.c
  	inode->i_blkbits = sb->s_blocksize_bits;
  	inode->i_flags = 0;
  	atomic_set(&inode->i_count, 1);
-@@ -138,6 +141,7 @@ int inode_init_always(struct super_block
+@@ -142,6 +145,7 @@ int inode_init_always(struct super_block
  	inode->i_opflags = 0;
  	i_uid_write(inode, 0);
  	i_gid_write(inode, 0);
@@ -3575,15 +3232,15 @@ diff -NurpP --minimal linux-3.18.5/fs/inode.c linux-3.18.5-vs2.3.7.3/fs/inode.c
  	atomic_set(&inode->i_writecount, 0);
  	inode->i_size = 0;
  	inode->i_blocks = 0;
-@@ -150,6 +154,7 @@ int inode_init_always(struct super_block
- 	inode->i_bdev = NULL;
+@@ -152,6 +156,7 @@ int inode_init_always(struct super_block
  	inode->i_cdev = NULL;
+ 	inode->i_link = NULL;
  	inode->i_rdev = 0;
 +	inode->i_mdev = 0;
  	inode->dirtied_when = 0;
  
  	if (security_inode_alloc(inode))
-@@ -478,6 +483,8 @@ void __insert_inode_hash(struct inode *i
+@@ -469,6 +474,8 @@ void __insert_inode_hash(struct inode *i
  }
  EXPORT_SYMBOL(__insert_inode_hash);
  
@@ -3592,7 +3249,7 @@ diff -NurpP --minimal linux-3.18.5/fs/inode.c linux-3.18.5-vs2.3.7.3/fs/inode.c
  /**
   *	__remove_inode_hash - remove an inode from the hash
   *	@inode: inode to unhash
-@@ -1795,9 +1802,11 @@ void init_special_inode(struct inode *in
+@@ -1911,9 +1918,11 @@ void init_special_inode(struct inode *in
  	if (S_ISCHR(mode)) {
  		inode->i_fop = &def_chr_fops;
  		inode->i_rdev = rdev;
@@ -3604,7 +3261,7 @@ diff -NurpP --minimal linux-3.18.5/fs/inode.c linux-3.18.5-vs2.3.7.3/fs/inode.c
  	} else if (S_ISFIFO(mode))
  		inode->i_fop = &pipefifo_fops;
  	else if (S_ISSOCK(mode))
-@@ -1826,6 +1835,7 @@ void inode_init_owner(struct inode *inod
+@@ -1942,6 +1951,7 @@ void inode_init_owner(struct inode *inod
  	} else
  		inode->i_gid = current_fsgid();
  	inode->i_mode = mode;
@@ -3612,9 +3269,9 @@ diff -NurpP --minimal linux-3.18.5/fs/inode.c linux-3.18.5-vs2.3.7.3/fs/inode.c
  }
  EXPORT_SYMBOL(inode_init_owner);
  
-diff -NurpP --minimal linux-3.18.5/fs/ioctl.c linux-3.18.5-vs2.3.7.3/fs/ioctl.c
---- linux-3.18.5/fs/ioctl.c	2014-01-22 20:39:06.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/ioctl.c	2015-01-19 10:57:47.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/ioctl.c linux-4.4.110-vs2.3.9/fs/ioctl.c
+--- linux-4.4.110/fs/ioctl.c	2015-04-12 22:12:50.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/ioctl.c	2018-01-09 16:36:32.000000000 +0000
 @@ -15,6 +15,9 @@
  #include <linux/writeback.h>
  #include <linux/buffer_head.h>
@@ -3625,12 +3282,12 @@ diff -NurpP --minimal linux-3.18.5/fs/ioctl.c linux-3.18.5-vs2.3.7.3/fs/ioctl.c
  
  #include <asm/ioctls.h>
  
-diff -NurpP --minimal linux-3.18.5/fs/jfs/file.c linux-3.18.5-vs2.3.7.3/fs/jfs/file.c
---- linux-3.18.5/fs/jfs/file.c	2014-09-03 13:19:40.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/jfs/file.c	2015-01-19 10:58:03.000000000 +0000
-@@ -110,7 +110,8 @@ int jfs_setattr(struct dentry *dentry, s
- 	if (is_quota_modification(inode, iattr))
- 		dquot_initialize(inode);
+diff -NurpP --minimal linux-4.4.110/fs/jfs/file.c linux-4.4.110-vs2.3.9/fs/jfs/file.c
+--- linux-4.4.110/fs/jfs/file.c	2016-07-05 04:12:33.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/jfs/file.c	2018-01-09 16:36:32.000000000 +0000
+@@ -113,7 +113,8 @@ int jfs_setattr(struct dentry *dentry, s
+ 			return rc;
+ 	}
  	if ((iattr->ia_valid & ATTR_UID && !uid_eq(iattr->ia_uid, inode->i_uid)) ||
 -	    (iattr->ia_valid & ATTR_GID && !gid_eq(iattr->ia_gid, inode->i_gid))) {
 +	    (iattr->ia_valid & ATTR_GID && !gid_eq(iattr->ia_gid, inode->i_gid)) ||
@@ -3638,7 +3295,7 @@ diff -NurpP --minimal linux-3.18.5/fs/jfs/file.c linux-3.18.5-vs2.3.7.3/fs/jfs/f
  		rc = dquot_transfer(inode, iattr);
  		if (rc)
  			return rc;
-@@ -146,6 +147,7 @@ const struct inode_operations jfs_file_i
+@@ -149,6 +150,7 @@ const struct inode_operations jfs_file_i
  	.get_acl	= jfs_get_acl,
  	.set_acl	= jfs_set_acl,
  #endif
@@ -3646,9 +3303,9 @@ diff -NurpP --minimal linux-3.18.5/fs/jfs/file.c linux-3.18.5-vs2.3.7.3/fs/jfs/f
  };
  
  const struct file_operations jfs_file_operations = {
-diff -NurpP --minimal linux-3.18.5/fs/jfs/ioctl.c linux-3.18.5-vs2.3.7.3/fs/jfs/ioctl.c
---- linux-3.18.5/fs/jfs/ioctl.c	2013-05-31 13:45:24.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/jfs/ioctl.c	2015-01-19 10:58:03.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/jfs/ioctl.c linux-4.4.110-vs2.3.9/fs/jfs/ioctl.c
+--- linux-4.4.110/fs/jfs/ioctl.c	2015-10-29 09:21:36.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/jfs/ioctl.c	2018-01-09 16:36:32.000000000 +0000
 @@ -12,6 +12,7 @@
  #include <linux/time.h>
  #include <linux/sched.h>
@@ -3706,9 +3363,9 @@ diff -NurpP --minimal linux-3.18.5/fs/jfs/ioctl.c linux-3.18.5-vs2.3.7.3/fs/jfs/
  		flags |= oldflags & ~JFS_FL_USER_MODIFIABLE;
  		jfs_inode->mode2 = flags;
  
-diff -NurpP --minimal linux-3.18.5/fs/jfs/jfs_dinode.h linux-3.18.5-vs2.3.7.3/fs/jfs/jfs_dinode.h
---- linux-3.18.5/fs/jfs/jfs_dinode.h	2012-12-11 03:30:57.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/jfs/jfs_dinode.h	2015-01-19 10:58:03.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/jfs/jfs_dinode.h linux-4.4.110-vs2.3.9/fs/jfs/jfs_dinode.h
+--- linux-4.4.110/fs/jfs/jfs_dinode.h	2015-04-12 22:12:50.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/jfs/jfs_dinode.h	2018-01-09 16:36:32.000000000 +0000
 @@ -161,9 +161,13 @@ struct dinode {
  
  #define JFS_APPEND_FL		0x01000000 /* writes to file may only append */
@@ -3725,9 +3382,9 @@ diff -NurpP --minimal linux-3.18.5/fs/jfs/jfs_dinode.h linux-3.18.5-vs2.3.7.3/fs
  #define JFS_FL_INHERIT		0x03C80000
  
  /* These are identical to EXT[23]_IOC_GETFLAGS/SETFLAGS */
-diff -NurpP --minimal linux-3.18.5/fs/jfs/jfs_filsys.h linux-3.18.5-vs2.3.7.3/fs/jfs/jfs_filsys.h
---- linux-3.18.5/fs/jfs/jfs_filsys.h	2012-12-11 03:30:57.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/jfs/jfs_filsys.h	2015-01-19 10:58:03.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/jfs/jfs_filsys.h linux-4.4.110-vs2.3.9/fs/jfs/jfs_filsys.h
+--- linux-4.4.110/fs/jfs/jfs_filsys.h	2015-04-12 22:12:50.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/jfs/jfs_filsys.h	2018-01-09 16:36:32.000000000 +0000
 @@ -266,6 +266,7 @@
  #define JFS_NAME_MAX	255
  #define JFS_PATH_MAX	BPSIZE
@@ -3736,9 +3393,9 @@ diff -NurpP --minimal linux-3.18.5/fs/jfs/jfs_filsys.h linux-3.18.5-vs2.3.7.3/fs
  
  /*
   *	file system state (superblock state)
-diff -NurpP --minimal linux-3.18.5/fs/jfs/jfs_imap.c linux-3.18.5-vs2.3.7.3/fs/jfs/jfs_imap.c
---- linux-3.18.5/fs/jfs/jfs_imap.c	2013-11-25 15:45:01.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/jfs/jfs_imap.c	2015-01-19 10:58:03.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/jfs/jfs_imap.c linux-4.4.110-vs2.3.9/fs/jfs/jfs_imap.c
+--- linux-4.4.110/fs/jfs/jfs_imap.c	2015-04-12 22:12:50.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/jfs/jfs_imap.c	2018-01-09 16:36:32.000000000 +0000
 @@ -46,6 +46,7 @@
  #include <linux/pagemap.h>
  #include <linux/quotaops.h>
@@ -3802,9 +3459,9 @@ diff -NurpP --minimal linux-3.18.5/fs/jfs/jfs_imap.c linux-3.18.5-vs2.3.7.3/fs/j
  	jfs_get_inode_flags(jfs_ip);
  	/*
  	 * mode2 is only needed for storing the higher order bits.
-diff -NurpP --minimal linux-3.18.5/fs/jfs/jfs_inode.c linux-3.18.5-vs2.3.7.3/fs/jfs/jfs_inode.c
---- linux-3.18.5/fs/jfs/jfs_inode.c	2014-09-03 13:19:40.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/jfs/jfs_inode.c	2015-01-21 09:53:08.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/jfs/jfs_inode.c linux-4.4.110-vs2.3.9/fs/jfs/jfs_inode.c
+--- linux-4.4.110/fs/jfs/jfs_inode.c	2016-07-05 04:12:33.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/jfs/jfs_inode.c	2018-01-09 16:36:32.000000000 +0000
 @@ -18,6 +18,7 @@
  
  #include <linux/fs.h>
@@ -3876,9 +3533,9 @@ diff -NurpP --minimal linux-3.18.5/fs/jfs/jfs_inode.c linux-3.18.5-vs2.3.7.3/fs/
  }
  
  /*
-diff -NurpP --minimal linux-3.18.5/fs/jfs/jfs_inode.h linux-3.18.5-vs2.3.7.3/fs/jfs/jfs_inode.h
---- linux-3.18.5/fs/jfs/jfs_inode.h	2012-12-11 03:30:57.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/jfs/jfs_inode.h	2015-01-19 10:58:03.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/jfs/jfs_inode.h linux-4.4.110-vs2.3.9/fs/jfs/jfs_inode.h
+--- linux-4.4.110/fs/jfs/jfs_inode.h	2015-04-12 22:12:50.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/jfs/jfs_inode.h	2018-01-09 16:36:32.000000000 +0000
 @@ -39,6 +39,7 @@ extern struct dentry *jfs_fh_to_dentry(s
  extern struct dentry *jfs_fh_to_parent(struct super_block *sb, struct fid *fid,
  	int fh_len, int fh_type);
@@ -3887,9 +3544,9 @@ diff -NurpP --minimal linux-3.18.5/fs/jfs/jfs_inode.h linux-3.18.5-vs2.3.7.3/fs/
  extern int jfs_get_block(struct inode *, sector_t, struct buffer_head *, int);
  extern int jfs_setattr(struct dentry *, struct iattr *);
  
-diff -NurpP --minimal linux-3.18.5/fs/jfs/namei.c linux-3.18.5-vs2.3.7.3/fs/jfs/namei.c
---- linux-3.18.5/fs/jfs/namei.c	2014-06-12 11:34:58.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/jfs/namei.c	2015-01-19 10:58:03.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/jfs/namei.c linux-4.4.110-vs2.3.9/fs/jfs/namei.c
+--- linux-4.4.110/fs/jfs/namei.c	2016-07-05 04:15:08.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/jfs/namei.c	2018-01-09 16:36:32.000000000 +0000
 @@ -22,6 +22,7 @@
  #include <linux/ctype.h>
  #include <linux/quotaops.h>
@@ -3898,7 +3555,7 @@ diff -NurpP --minimal linux-3.18.5/fs/jfs/namei.c linux-3.18.5-vs2.3.7.3/fs/jfs/
  #include "jfs_incore.h"
  #include "jfs_superblock.h"
  #include "jfs_inode.h"
-@@ -1461,6 +1462,7 @@ static struct dentry *jfs_lookup(struct
+@@ -1480,6 +1481,7 @@ static struct dentry *jfs_lookup(struct
  			jfs_err("jfs_lookup: iget failed on inum %d", (uint)inum);
  	}
  
@@ -3906,7 +3563,7 @@ diff -NurpP --minimal linux-3.18.5/fs/jfs/namei.c linux-3.18.5-vs2.3.7.3/fs/jfs/
  	return d_splice_alias(ip, dentry);
  }
  
-@@ -1526,6 +1528,7 @@ const struct inode_operations jfs_dir_in
+@@ -1545,6 +1547,7 @@ const struct inode_operations jfs_dir_in
  	.get_acl	= jfs_get_acl,
  	.set_acl	= jfs_set_acl,
  #endif
@@ -3914,10 +3571,10 @@ diff -NurpP --minimal linux-3.18.5/fs/jfs/namei.c linux-3.18.5-vs2.3.7.3/fs/jfs/
  };
  
  const struct file_operations jfs_dir_operations = {
-diff -NurpP --minimal linux-3.18.5/fs/jfs/super.c linux-3.18.5-vs2.3.7.3/fs/jfs/super.c
---- linux-3.18.5/fs/jfs/super.c	2015-01-17 02:40:19.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/jfs/super.c	2015-01-19 10:58:03.000000000 +0000
-@@ -203,7 +203,8 @@ enum {
+diff -NurpP --minimal linux-4.4.110/fs/jfs/super.c linux-4.4.110-vs2.3.9/fs/jfs/super.c
+--- linux-4.4.110/fs/jfs/super.c	2018-01-09 16:35:06.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/jfs/super.c	2018-01-09 16:36:32.000000000 +0000
+@@ -206,7 +206,8 @@ enum {
  	Opt_integrity, Opt_nointegrity, Opt_iocharset, Opt_resize,
  	Opt_resize_nosize, Opt_errors, Opt_ignore, Opt_err, Opt_quota,
  	Opt_usrquota, Opt_grpquota, Opt_uid, Opt_gid, Opt_umask,
@@ -3927,7 +3584,7 @@ diff -NurpP --minimal linux-3.18.5/fs/jfs/super.c linux-3.18.5-vs2.3.7.3/fs/jfs/
  };
  
  static const match_table_t tokens = {
-@@ -213,6 +214,10 @@ static const match_table_t tokens = {
+@@ -216,6 +217,10 @@ static const match_table_t tokens = {
  	{Opt_resize, "resize=%u"},
  	{Opt_resize_nosize, "resize"},
  	{Opt_errors, "errors=%s"},
@@ -3938,7 +3595,7 @@ diff -NurpP --minimal linux-3.18.5/fs/jfs/super.c linux-3.18.5-vs2.3.7.3/fs/jfs/
  	{Opt_ignore, "noquota"},
  	{Opt_ignore, "quota"},
  	{Opt_usrquota, "usrquota"},
-@@ -402,7 +407,20 @@ static int parse_options(char *options,
+@@ -405,7 +410,20 @@ static int parse_options(char *options,
  				pr_err("JFS: discard option not supported on device\n");
  			break;
  		}
@@ -3960,7 +3617,7 @@ diff -NurpP --minimal linux-3.18.5/fs/jfs/super.c linux-3.18.5-vs2.3.7.3/fs/jfs/
  		default:
  			printk("jfs: Unrecognized mount option \"%s\" or missing value\n",
  			       p);
-@@ -434,6 +452,12 @@ static int jfs_remount(struct super_bloc
+@@ -437,6 +455,12 @@ static int jfs_remount(struct super_bloc
  	if (!parse_options(data, sb, &newLVSize, &flag))
  		return -EINVAL;
  
@@ -3983,10 +3640,10 @@ diff -NurpP --minimal linux-3.18.5/fs/jfs/super.c linux-3.18.5-vs2.3.7.3/fs/jfs/
  
  	if (newLVSize) {
  		pr_err("resize option for remount only\n");
-diff -NurpP --minimal linux-3.18.5/fs/libfs.c linux-3.18.5-vs2.3.7.3/fs/libfs.c
---- linux-3.18.5/fs/libfs.c	2015-02-05 18:02:45.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/libfs.c	2015-01-22 07:27:38.000000000 +0000
-@@ -146,13 +146,14 @@ static inline unsigned char dt_type(stru
+diff -NurpP --minimal linux-4.4.110/fs/libfs.c linux-4.4.110-vs2.3.9/fs/libfs.c
+--- linux-4.4.110/fs/libfs.c	2016-07-05 04:12:33.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/libfs.c	2018-01-09 16:36:32.000000000 +0000
+@@ -141,13 +141,14 @@ static inline unsigned char dt_type(stru
   * both impossible due to the lock on directory.
   */
  
@@ -4005,7 +3662,7 @@ diff -NurpP --minimal linux-3.18.5/fs/libfs.c linux-3.18.5-vs2.3.7.3/fs/libfs.c
  		return 0;
  	spin_lock(&dentry->d_lock);
  	if (ctx->pos == 2)
-@@ -160,6 +161,8 @@ int dcache_readdir(struct file *file, st
+@@ -155,6 +156,8 @@ int dcache_readdir(struct file *file, st
  
  	for (p = q->next; p != &dentry->d_subdirs; p = p->next) {
  		struct dentry *next = list_entry(p, struct dentry, d_child);
@@ -4014,7 +3671,7 @@ diff -NurpP --minimal linux-3.18.5/fs/libfs.c linux-3.18.5-vs2.3.7.3/fs/libfs.c
  		spin_lock_nested(&next->d_lock, DENTRY_D_LOCK_NESTED);
  		if (!simple_positive(next)) {
  			spin_unlock(&next->d_lock);
-@@ -182,8 +185,22 @@ int dcache_readdir(struct file *file, st
+@@ -177,8 +180,22 @@ int dcache_readdir(struct file *file, st
  	spin_unlock(&dentry->d_lock);
  	return 0;
  }
@@ -4037,9 +3694,9 @@ diff -NurpP --minimal linux-3.18.5/fs/libfs.c linux-3.18.5-vs2.3.7.3/fs/libfs.c
  ssize_t generic_read_dir(struct file *filp, char __user *buf, size_t siz, loff_t *ppos)
  {
  	return -EISDIR;
-diff -NurpP --minimal linux-3.18.5/fs/locks.c linux-3.18.5-vs2.3.7.3/fs/locks.c
---- linux-3.18.5/fs/locks.c	2015-02-05 18:02:45.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/locks.c	2015-01-28 11:48:02.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/locks.c linux-4.4.110-vs2.3.9/fs/locks.c
+--- linux-4.4.110/fs/locks.c	2018-01-09 16:35:06.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/locks.c	2018-01-09 16:36:32.000000000 +0000
 @@ -129,6 +129,8 @@
  #include <linux/hashtable.h>
  #include <linux/percpu.h>
@@ -4049,7 +3706,7 @@ diff -NurpP --minimal linux-3.18.5/fs/locks.c linux-3.18.5-vs2.3.7.3/fs/locks.c
  
  #define CREATE_TRACE_POINTS
  #include <trace/events/filelock.h>
-@@ -214,11 +216,17 @@ static void locks_init_lock_heads(struct
+@@ -255,11 +257,15 @@ static void locks_init_lock_heads(struct
  /* Allocate an empty lock structure. */
  struct file_lock *locks_alloc_lock(void)
  {
@@ -4058,27 +3715,17 @@ diff -NurpP --minimal linux-3.18.5/fs/locks.c linux-3.18.5-vs2.3.7.3/fs/locks.c
  
 -	if (fl)
 -		locks_init_lock_heads(fl);
-+	if (!vx_locks_avail(1))
-+		return NULL;
- 
 +	fl = kmem_cache_zalloc(filelock_cache, GFP_KERNEL);
-+
+ 
 +	if (fl) {
 +		locks_init_lock_heads(fl);
++		vx_locks_inc(fl);
 +		fl->fl_xid = -1;
 +	}
  	return fl;
  }
  EXPORT_SYMBOL_GPL(locks_alloc_lock);
-@@ -246,6 +254,7 @@ void locks_free_lock(struct file_lock *f
- 	BUG_ON(!list_empty(&fl->fl_block));
- 	BUG_ON(!hlist_unhashed(&fl->fl_link));
- 
-+	vx_locks_dec(fl);
- 	locks_release_private(fl);
- 	kmem_cache_free(filelock_cache, fl);
- }
-@@ -267,6 +276,7 @@ void locks_init_lock(struct file_lock *f
+@@ -311,6 +317,7 @@ void locks_init_lock(struct file_lock *f
  {
  	memset(fl, 0, sizeof(struct file_lock));
  	locks_init_lock_heads(fl);
@@ -4086,7 +3733,7 @@ diff -NurpP --minimal linux-3.18.5/fs/locks.c linux-3.18.5-vs2.3.7.3/fs/locks.c
  }
  
  EXPORT_SYMBOL(locks_init_lock);
-@@ -284,6 +294,7 @@ void locks_copy_conflock(struct file_loc
+@@ -328,6 +335,7 @@ void locks_copy_conflock(struct file_loc
  	new->fl_start = fl->fl_start;
  	new->fl_end = fl->fl_end;
  	new->fl_lmops = fl->fl_lmops;
@@ -4094,19 +3741,19 @@ diff -NurpP --minimal linux-3.18.5/fs/locks.c linux-3.18.5-vs2.3.7.3/fs/locks.c
  	new->fl_ops = NULL;
  
  	if (fl->fl_lmops) {
-@@ -345,6 +356,11 @@ flock_make_lock(struct file *filp, unsig
+@@ -389,7 +397,10 @@ flock_make_lock(struct file *filp, unsig
  	fl->fl_flags = FL_FLOCK;
  	fl->fl_type = type;
  	fl->fl_end = OFFSET_MAX;
+-	
 +
 +	vxd_assert(filp->f_xid == vx_current_xid(),
 +		"f_xid(%d) == current(%d)", filp->f_xid, vx_current_xid());
 +	fl->fl_xid = filp->f_xid;
-+	vx_locks_inc(fl);
- 	
  	return fl;
  }
-@@ -467,6 +483,7 @@ static int lease_init(struct file *filp,
+ 
+@@ -511,6 +522,7 @@ static int lease_init(struct file *filp,
  
  	fl->fl_owner = filp;
  	fl->fl_pid = current->tgid;
@@ -4114,7 +3761,7 @@ diff -NurpP --minimal linux-3.18.5/fs/locks.c linux-3.18.5-vs2.3.7.3/fs/locks.c
  
  	fl->fl_file = filp;
  	fl->fl_flags = FL_LEASE;
-@@ -486,6 +503,11 @@ static struct file_lock *lease_alloc(str
+@@ -530,6 +542,10 @@ static struct file_lock *lease_alloc(str
  	if (fl == NULL)
  		return ERR_PTR(error);
  
@@ -4122,27 +3769,18 @@ diff -NurpP --minimal linux-3.18.5/fs/locks.c linux-3.18.5-vs2.3.7.3/fs/locks.c
 +	if (filp)
 +		vxd_assert(filp->f_xid == fl->fl_xid,
 +			"f_xid(%d) == fl_xid(%d)", filp->f_xid, fl->fl_xid);
-+	vx_locks_inc(fl);
  	error = lease_init(filp, type, fl);
  	if (error) {
  		locks_free_lock(fl);
-@@ -892,6 +914,7 @@ static int flock_lock_file(struct file *
- 		spin_lock(&inode->i_lock);
+@@ -908,6 +924,7 @@ static int flock_lock_inode(struct inode
+ 		goto out;
  	}
  
 +	new_fl->fl_xid = -1;
  find_conflict:
- 	for_each_lock(inode, before) {
- 		struct file_lock *fl = *before;
-@@ -912,6 +935,7 @@ find_conflict:
- 		goto out;
- 	locks_copy_lock(new_fl, request);
- 	locks_insert_lock(before, new_fl);
-+	vx_locks_inc(new_fl);
- 	new_fl = NULL;
- 	error = 0;
- 
-@@ -923,7 +947,8 @@ out:
+ 	list_for_each_entry(fl, &ctx->flc_flock, fl_list) {
+ 		if (!flock_locks_conflict(request, fl))
+@@ -934,7 +951,8 @@ out:
  	return error;
  }
  
@@ -4150,30 +3788,31 @@ diff -NurpP --minimal linux-3.18.5/fs/locks.c linux-3.18.5-vs2.3.7.3/fs/locks.c
 +static int __posix_lock_file(struct inode *inode, struct file_lock *request,
 +	struct file_lock *conflock, vxid_t xid)
  {
- 	struct file_lock *fl;
+ 	struct file_lock *fl, *tmp;
  	struct file_lock *new_fl = NULL;
-@@ -935,6 +960,8 @@ static int __posix_lock_file(struct inod
- 	bool added = false;
- 	LIST_HEAD(dispose);
+@@ -950,6 +968,9 @@ static int __posix_lock_file(struct inod
+ 	if (!ctx)
+ 		return (request->fl_type == F_UNLCK) ? 0 : -ENOMEM;
  
-+	vxd_assert(xid == vx_current_xid(),
-+		"xid(%d) == current(%d)", xid, vx_current_xid());
++	if (xid)
++		vxd_assert(xid == vx_current_xid(),
++			"xid(%d) == current(%d)", xid, vx_current_xid());
  	/*
  	 * We may need two file_lock structures for this operation,
  	 * so we get them in advance to avoid races.
-@@ -945,7 +972,11 @@ static int __posix_lock_file(struct inod
+@@ -960,7 +981,11 @@ static int __posix_lock_file(struct inod
  	    (request->fl_type != F_UNLCK ||
  	     request->fl_start != 0 || request->fl_end != OFFSET_MAX)) {
  		new_fl = locks_alloc_lock();
 +		new_fl->fl_xid = xid;
-+		vx_locks_inc(new_fl);
++		// vx_locks_inc(new_fl);
  		new_fl2 = locks_alloc_lock();
 +		new_fl2->fl_xid = xid;
-+		vx_locks_inc(new_fl2);
++		// vx_locks_inc(new_fl2);
  	}
  
- 	spin_lock(&inode->i_lock);
-@@ -1158,7 +1189,8 @@ static int __posix_lock_file(struct inod
+ 	spin_lock(&ctx->flc_lock);
+@@ -1162,7 +1187,8 @@ static int __posix_lock_file(struct inod
  int posix_lock_file(struct file *filp, struct file_lock *fl,
  			struct file_lock *conflock)
  {
@@ -4183,57 +3822,64 @@ diff -NurpP --minimal linux-3.18.5/fs/locks.c linux-3.18.5-vs2.3.7.3/fs/locks.c
  }
  EXPORT_SYMBOL(posix_lock_file);
  
-@@ -1252,7 +1284,7 @@ int locks_mandatory_area(int read_write,
+@@ -1178,7 +1204,7 @@ static int posix_lock_inode_wait(struct
+ 	int error;
+ 	might_sleep ();
+ 	for (;;) {
+-		error = __posix_lock_file(inode, fl, NULL);
++		error = __posix_lock_file(inode, fl, NULL, 0);
+ 		if (error != FILE_LOCK_DEFERRED)
+ 			break;
+ 		error = wait_event_interruptible(fl->fl_wait, !fl->fl_next);
+@@ -1257,10 +1283,13 @@ int locks_mandatory_area(int read_write,
+ 	fl.fl_end = offset + count - 1;
+ 
+ 	for (;;) {
++		vxid_t f_xid = 0;
++
  		if (filp) {
  			fl.fl_owner = filp;
  			fl.fl_flags &= ~FL_SLEEP;
 -			error = __posix_lock_file(inode, &fl, NULL);
-+			error = __posix_lock_file(inode, &fl, NULL, filp->f_xid);
++			f_xid = filp->f_xid;
++			error = __posix_lock_file(inode, &fl, NULL, f_xid);
  			if (!error)
  				break;
  		}
-@@ -1260,7 +1292,7 @@ int locks_mandatory_area(int read_write,
+@@ -1268,7 +1297,7 @@ int locks_mandatory_area(int read_write,
  		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, f_xid);
  		if (error != FILE_LOCK_DEFERRED)
  			break;
  		error = wait_event_interruptible(fl.fl_wait, !fl.fl_next);
-@@ -1655,6 +1687,7 @@ generic_add_lease(struct file *filp, lon
- 		goto out;
- 
- 	locks_insert_lock(before, lease);
-+	vx_locks_inc(lease);
- 	/*
- 	 * The check in break_lease() is lockless. It's possible for another
- 	 * open to race in after we did the earlier check for a conflicting
-@@ -2110,6 +2143,11 @@ int fcntl_setlk(unsigned int fd, struct
+@@ -2165,6 +2194,11 @@ int fcntl_setlk(unsigned int fd, struct
  	if (file_lock == NULL)
  		return -ENOLCK;
  
 +	vxd_assert(filp->f_xid == vx_current_xid(),
 +		"f_xid(%d) == current(%d)", filp->f_xid, vx_current_xid());
 +	file_lock->fl_xid = filp->f_xid;
-+	vx_locks_inc(file_lock);
++	// vx_locks_inc(file_lock);
 +
  	/*
  	 * This might block, so we do it before checking the inode.
  	 */
-@@ -2250,6 +2288,11 @@ int fcntl_setlk64(unsigned int fd, struc
+@@ -2307,6 +2341,11 @@ int fcntl_setlk64(unsigned int fd, struc
  	if (file_lock == NULL)
  		return -ENOLCK;
  
 +	vxd_assert(filp->f_xid == vx_current_xid(),
 +		"f_xid(%d) == current(%d)", filp->f_xid, vx_current_xid());
 +	file_lock->fl_xid = filp->f_xid;
-+	vx_locks_inc(file_lock);
++	// vx_locks_inc(file_lock);
 +
  	/*
  	 * This might block, so we do it before checking the inode.
  	 */
-@@ -2557,8 +2600,11 @@ static int locks_show(struct seq_file *f
+@@ -2620,8 +2659,11 @@ static int locks_show(struct seq_file *f
  
  	lock_get_status(f, fl, iter->li_pos, "");
  
@@ -4246,20 +3892,20 @@ diff -NurpP --minimal linux-3.18.5/fs/locks.c linux-3.18.5-vs2.3.7.3/fs/locks.c
  
  	return 0;
  }
-diff -NurpP --minimal linux-3.18.5/fs/mount.h linux-3.18.5-vs2.3.7.3/fs/mount.h
---- linux-3.18.5/fs/mount.h	2015-01-17 02:40:19.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/mount.h	2015-01-19 10:58:03.000000000 +0000
-@@ -62,6 +62,7 @@ struct mount {
- 	int mnt_expiry_mark;		/* true if marked for expiry */
+diff -NurpP --minimal linux-4.4.110/fs/mount.h linux-4.4.110-vs2.3.9/fs/mount.h
+--- linux-4.4.110/fs/mount.h	2018-01-09 16:35:06.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/mount.h	2018-01-09 16:36:32.000000000 +0000
+@@ -68,6 +68,7 @@ struct mount {
  	struct hlist_head mnt_pins;
- 	struct path mnt_ex_mountpoint;
+ 	struct fs_pin mnt_umount;
+ 	struct dentry *mnt_ex_mountpoint;
 +	vtag_t mnt_tag;			/* tagging used for vfsmount */
  };
  
  #define MNT_NS_INTERNAL ERR_PTR(-EINVAL) /* distinct from any mnt_namespace */
-diff -NurpP --minimal linux-3.18.5/fs/namei.c linux-3.18.5-vs2.3.7.3/fs/namei.c
---- linux-3.18.5/fs/namei.c	2015-01-17 02:40:19.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/namei.c	2015-01-22 08:31:30.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/namei.c linux-4.4.110-vs2.3.9/fs/namei.c
+--- linux-4.4.110/fs/namei.c	2018-01-09 16:35:06.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/namei.c	2018-01-09 17:21:19.000000000 +0000
 @@ -34,10 +34,20 @@
  #include <linux/device_cgroup.h>
  #include <linux/fs_struct.h>
@@ -4281,7 +3927,7 @@ diff -NurpP --minimal linux-3.18.5/fs/namei.c linux-3.18.5-vs2.3.7.3/fs/namei.c
  #include "mount.h"
  
  /* [Feb-1997 T. Schoebel-Theuer]
-@@ -278,6 +288,93 @@ static int check_acl(struct inode *inode
+@@ -283,6 +293,93 @@ static int check_acl(struct inode *inode
  	return -EAGAIN;
  }
  
@@ -4375,7 +4021,7 @@ diff -NurpP --minimal linux-3.18.5/fs/namei.c linux-3.18.5-vs2.3.7.3/fs/namei.c
  /*
   * This does the basic permission checking
   */
-@@ -402,10 +499,14 @@ int __inode_permission(struct inode *ino
+@@ -407,10 +504,14 @@ int __inode_permission(struct inode *ino
  		/*
  		 * Nobody gets write access to an immutable file.
  		 */
@@ -4391,26 +4037,26 @@ diff -NurpP --minimal linux-3.18.5/fs/namei.c linux-3.18.5-vs2.3.7.3/fs/namei.c
  	retval = do_inode_permission(inode, mask);
  	if (retval)
  		return retval;
-@@ -1416,6 +1517,9 @@ static int lookup_fast(struct nameidata
- 				goto unlazy;
- 			}
- 		}
+@@ -1583,6 +1684,9 @@ static int lookup_fast(struct nameidata
+ 		 */
+ 		if (negative)
+ 			return -ENOENT;
 +
 +		/* FIXME: check dx permission */
 +
  		path->mnt = mnt;
  		path->dentry = dentry;
- 		if (likely(__follow_mount_rcu(nd, path, inode)))
-@@ -1442,6 +1546,8 @@ unlazy:
- 		goto need_lookup;
+ 		if (likely(__follow_mount_rcu(nd, path, inode, seqp)))
+@@ -1613,6 +1717,8 @@ unlazy:
+ 		dput(dentry);
+ 		return -ENOENT;
  	}
- 
-+	/* FIXME: check dx permission */
 +
++	/* FIXME: check dx permission */
  	path->mnt = mnt;
  	path->dentry = dentry;
- 	err = follow_managed(path, nd->flags);
-@@ -2434,7 +2540,7 @@ static int may_delete(struct inode *dir,
+ 	err = follow_managed(path, nd);
+@@ -2571,7 +2677,7 @@ static int may_delete(struct inode *dir,
  		return -EPERM;
  
  	if (check_sticky(dir, inode) || IS_APPEND(inode) ||
@@ -4419,7 +4065,7 @@ diff -NurpP --minimal linux-3.18.5/fs/namei.c linux-3.18.5-vs2.3.7.3/fs/namei.c
  		return -EPERM;
  	if (isdir) {
  		if (!d_is_dir(victim))
-@@ -2516,19 +2622,25 @@ int vfs_create(struct inode *dir, struct
+@@ -2653,19 +2759,25 @@ int vfs_create(struct inode *dir, struct
  		bool want_excl)
  {
  	int error = may_create(dir, dentry);
@@ -4447,7 +4093,7 @@ diff -NurpP --minimal linux-3.18.5/fs/namei.c linux-3.18.5-vs2.3.7.3/fs/namei.c
  	return error;
  }
  EXPORT_SYMBOL(vfs_create);
-@@ -2564,6 +2676,15 @@ static int may_open(struct path *path, i
+@@ -2701,6 +2813,15 @@ static int may_open(struct path *path, i
  		break;
  	}
  
@@ -4463,7 +4109,7 @@ diff -NurpP --minimal linux-3.18.5/fs/namei.c linux-3.18.5-vs2.3.7.3/fs/namei.c
  	error = inode_permission(inode, acc_mode);
  	if (error)
  		return error;
-@@ -3058,6 +3179,16 @@ finish_open:
+@@ -3178,6 +3299,16 @@ finish_open:
  	}
  finish_open_created:
  	error = may_open(&nd->path, acc_mode, open_flag);
@@ -4480,36 +4126,21 @@ diff -NurpP --minimal linux-3.18.5/fs/namei.c linux-3.18.5-vs2.3.7.3/fs/namei.c
  	if (error)
  		goto out;
  
-@@ -3187,6 +3318,7 @@ static struct file *path_openat(int dfd,
+@@ -3302,6 +3433,9 @@ static struct file *path_openat(struct n
  	int opened = 0;
  	int error;
  
++#ifdef	CONFIG_VSERVER_COWBL
 +restart:
++#endif
  	file = get_empty_filp();
  	if (IS_ERR(file))
  		return file;
-@@ -3228,6 +3360,16 @@ static struct file *path_openat(int dfd,
- 		error = do_last(nd, &path, file, op, &opened, pathname);
- 		put_link(nd, &link, cookie);
- 	}
-+
-+#ifdef	CONFIG_VSERVER_COWBL
-+	if (error == -EMLINK) {
-+		if (nd->root.mnt && !(nd->flags & LOOKUP_ROOT))
-+			path_put(&nd->root);
-+		if (base)
-+			fput(base);
-+		goto restart;
-+	}
-+#endif
- out:
- 	if (nd->root.mnt && !(nd->flags & LOOKUP_ROOT))
- 		path_put(&nd->root);
-@@ -3343,6 +3485,11 @@ struct dentry *kern_path_create(int dfd,
+@@ -3448,6 +3582,11 @@ static struct dentry *filename_create(in
  		goto fail;
  	}
- 	*path = nd.path;
-+	vxdprintk(VXD_CBIT(misc, 3), "kern_path_create path.dentry = %p (%.*s), dentry = %p (%.*s), d_inode = %p",
+ 	putname(name);
++	vxdprintk(VXD_CBIT(misc, 3), "filename_create path.dentry = %p (%.*s), dentry = %p (%.*s), d_inode = %p",
 +		path->dentry, path->dentry->d_name.len,
 +		path->dentry->d_name.name, dentry,
 +		dentry->d_name.len, dentry->d_name.name,
@@ -4517,7 +4148,21 @@ diff -NurpP --minimal linux-3.18.5/fs/namei.c linux-3.18.5-vs2.3.7.3/fs/namei.c
  	return dentry;
  fail:
  	dput(dentry);
-@@ -3899,7 +4046,7 @@ int vfs_link(struct dentry *old_dentry,
+@@ -3564,6 +3703,13 @@ retry:
+ 			error = vfs_mknod(path.dentry->d_inode,dentry,mode,0);
+ 			break;
+ 	}
++
++#ifdef	CONFIG_VSERVER_COWBL
++	if (error == -EMLINK) {
++		path_cleanup(nd);
++		goto restart;
++	}
++#endif
+ out:
+ 	done_path_create(&path, dentry);
+ 	if (retry_estale(error, lookup_flags)) {
+@@ -4010,7 +4156,7 @@ int vfs_link(struct dentry *old_dentry,
  	/*
  	 * A link to an append-only or immutable file cannot be created.
  	 */
@@ -4526,7 +4171,7 @@ diff -NurpP --minimal linux-3.18.5/fs/namei.c linux-3.18.5-vs2.3.7.3/fs/namei.c
  		return -EPERM;
  	if (!dir->i_op->link)
  		return -EPERM;
-@@ -4404,6 +4551,289 @@ int generic_readlink(struct dentry *dent
+@@ -4519,6 +4665,295 @@ int generic_readlink(struct dentry *dent
  }
  EXPORT_SYMBOL(generic_readlink);
  
@@ -4552,17 +4197,19 @@ diff -NurpP --minimal linux-3.18.5/fs/namei.c linux-3.18.5-vs2.3.7.3/fs/namei.c
 +	struct file *new_file;
 +	char *to, *path, pad='\251';
 +	loff_t size;
++	struct filename *filename = getname_kernel(pathname);
++	struct filename *to_filename;
 +
 +	vxdprintk(VXD_CBIT(misc, 1),
 +		"cow_break_link(" VS_Q("%s") ")", pathname);
 +
 +	path = kmalloc(PATH_MAX, GFP_KERNEL);
 +	ret = -ENOMEM;
-+	if (!path)
++	if (!path || IS_ERR(filename))
 +		goto out;
 +
 +	/* old_nd.path will have refs to dentry and mnt */
-+	ret = do_path_lookup(AT_FDCWD, pathname, LOOKUP_FOLLOW, &old_nd);
++	ret = filename_lookup(AT_FDCWD, filename, LOOKUP_FOLLOW, &old_nd);
 +	vxdprintk(VXD_CBIT(misc, 2),
 +		"do_path_lookup(old): %d", ret);
 +	if (ret < 0)
@@ -4593,8 +4240,10 @@ diff -NurpP --minimal linux-3.18.5/fs/namei.c linux-3.18.5-vs2.3.7.3/fs/namei.c
 +	vxdprintk(VXD_CBIT(misc, 1), "temp copy " VS_Q("%s"), to);
 +
 +	/* dir_nd.path will have refs to dentry and mnt */
-+	ret = do_path_lookup(AT_FDCWD, to,
++	to_filename = getname_kernel(to);
++	ret = filename_lookup(AT_FDCWD, to_filename,
 +		LOOKUP_PARENT | LOOKUP_OPEN | LOOKUP_CREATE, &dir_nd);
++	putname(to_filename);
 +	vxdprintk(VXD_CBIT(misc, 2), "do_path_lookup(new): %d", ret);
 +	if (ret < 0)
 +		goto retry;
@@ -4645,7 +4294,7 @@ diff -NurpP --minimal linux-3.18.5/fs/namei.c linux-3.18.5-vs2.3.7.3/fs/namei.c
 +	else if (ret < 0)
 +		goto out_unlock_new;
 +
-+	/* drop out early, ret passes ENOENT */
++	/* the old file went away */
 +	ret = -ENOENT;
 +	if ((redo = d_unhashed(old_dentry)))
 +		goto out_unlock_new;
@@ -4676,7 +4325,7 @@ diff -NurpP --minimal linux-3.18.5/fs/namei.c linux-3.18.5-vs2.3.7.3/fs/namei.c
 +
 +	drop = 0;
 +
-+	size = i_size_read(old_file->f_dentry->d_inode);
++	size = i_size_read(old_file->f_path.dentry->d_inode);
 +	ret = do_cow_splice(old_file, new_file, size);
 +	vxdprintk(VXD_CBIT(misc, 2), "do_splice_direct: %d", ret);
 +	if (ret < 0) {
@@ -4754,7 +4403,7 @@ diff -NurpP --minimal linux-3.18.5/fs/namei.c linux-3.18.5-vs2.3.7.3/fs/namei.c
 +
 +	/* lookup dentry once again
 +	   old_nd.path will be freed as old_path in out_rel_old */
-+	ret = do_path_lookup(AT_FDCWD, pathname, LOOKUP_FOLLOW, &old_nd);
++	ret = filename_lookup(AT_FDCWD, filename, LOOKUP_FOLLOW, &old_nd);
 +	if (ret)
 +		goto out_rel_both;
 +
@@ -4780,6 +4429,8 @@ diff -NurpP --minimal linux-3.18.5/fs/namei.c linux-3.18.5-vs2.3.7.3/fs/namei.c
 +		dput(new_dentry);
 +		new_dentry = ERR_PTR(ret);
 +	}
++	if (!IS_ERR(filename))
++		putname(filename);
 +	vxdprintk(VXD_CBIT(misc, 3),
 +		"cow_break_link returning with %p", new_dentry);
 +	return new_dentry;
@@ -4816,9 +4467,9 @@ diff -NurpP --minimal linux-3.18.5/fs/namei.c linux-3.18.5-vs2.3.7.3/fs/namei.c
  /* get the link contents into pagecache */
  static char *page_getlink(struct dentry * dentry, struct page **ppage)
  {
-diff -NurpP --minimal linux-3.18.5/fs/namespace.c linux-3.18.5-vs2.3.7.3/fs/namespace.c
---- linux-3.18.5/fs/namespace.c	2015-02-05 18:02:45.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/namespace.c	2015-01-19 12:08:57.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/namespace.c linux-4.4.110-vs2.3.9/fs/namespace.c
+--- linux-4.4.110/fs/namespace.c	2018-01-09 16:35:06.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/namespace.c	2018-01-09 16:36:32.000000000 +0000
 @@ -24,6 +24,11 @@
  #include <linux/magic.h>
  #include <linux/bootmem.h>
@@ -4831,7 +4482,7 @@ diff -NurpP --minimal linux-3.18.5/fs/namespace.c linux-3.18.5-vs2.3.7.3/fs/name
  #include "pnode.h"
  #include "internal.h"
  
-@@ -897,6 +902,10 @@ vfs_kern_mount(struct file_system_type *
+@@ -971,6 +976,10 @@ vfs_kern_mount(struct file_system_type *
  	if (!type)
  		return ERR_PTR(-ENODEV);
  
@@ -4842,7 +4493,7 @@ diff -NurpP --minimal linux-3.18.5/fs/namespace.c linux-3.18.5-vs2.3.7.3/fs/name
  	mnt = alloc_vfsmnt(name);
  	if (!mnt)
  		return ERR_PTR(-ENOMEM);
-@@ -971,6 +980,7 @@ static struct mount *clone_mnt(struct mo
+@@ -1046,6 +1055,7 @@ static struct mount *clone_mnt(struct mo
  	mnt->mnt.mnt_root = dget(root);
  	mnt->mnt_mountpoint = mnt->mnt.mnt_root;
  	mnt->mnt_parent = mnt;
@@ -4850,7 +4501,7 @@ diff -NurpP --minimal linux-3.18.5/fs/namespace.c linux-3.18.5-vs2.3.7.3/fs/name
  	lock_mount_hash();
  	list_add_tail(&mnt->mnt_instance, &sb->s_mounts);
  	unlock_mount_hash();
-@@ -1508,7 +1518,8 @@ out_unlock:
+@@ -1620,7 +1630,8 @@ out_unlock:
   */
  static inline bool may_mount(void)
  {
@@ -4860,7 +4511,7 @@ diff -NurpP --minimal linux-3.18.5/fs/namespace.c linux-3.18.5-vs2.3.7.3/fs/name
  }
  
  /*
-@@ -1969,6 +1980,7 @@ static int do_change_type(struct path *p
+@@ -2121,6 +2132,7 @@ static int do_change_type(struct path *p
  		if (err)
  			goto out_unlock;
  	}
@@ -4868,7 +4519,7 @@ diff -NurpP --minimal linux-3.18.5/fs/namespace.c linux-3.18.5-vs2.3.7.3/fs/name
  
  	lock_mount_hash();
  	for (m = mnt; m; m = (recurse ? next_mnt(m, mnt) : NULL))
-@@ -1997,12 +2009,14 @@ static bool has_locked_children(struct m
+@@ -2149,12 +2161,14 @@ static bool has_locked_children(struct m
   * do loopback mount.
   */
  static int do_loopback(struct path *path, const char *old_name,
@@ -4884,7 +4535,7 @@ diff -NurpP --minimal linux-3.18.5/fs/namespace.c linux-3.18.5-vs2.3.7.3/fs/name
  	if (!old_name || !*old_name)
  		return -EINVAL;
  	err = kern_path(old_name, LOOKUP_FOLLOW|LOOKUP_AUTOMOUNT, &old_path);
-@@ -2079,7 +2093,7 @@ static int change_mount_flags(struct vfs
+@@ -2234,7 +2248,7 @@ static int change_mount_flags(struct vfs
   * on it - tough luck.
   */
  static int do_remount(struct path *path, int flags, int mnt_flags,
@@ -4893,7 +4544,7 @@ diff -NurpP --minimal linux-3.18.5/fs/namespace.c linux-3.18.5-vs2.3.7.3/fs/name
  {
  	int err;
  	struct super_block *sb = path->mnt->mnt_sb;
-@@ -2579,6 +2593,7 @@ long do_mount(const char *dev_name, cons
+@@ -2742,6 +2756,7 @@ long do_mount(const char *dev_name, cons
  	struct path path;
  	int retval = 0;
  	int mnt_flags = 0;
@@ -4901,7 +4552,7 @@ diff -NurpP --minimal linux-3.18.5/fs/namespace.c linux-3.18.5-vs2.3.7.3/fs/name
  
  	/* Discard magic */
  	if ((flags & MS_MGC_MSK) == MS_MGC_VAL)
-@@ -2604,6 +2619,12 @@ long do_mount(const char *dev_name, cons
+@@ -2767,6 +2782,12 @@ long do_mount(const char *dev_name, cons
  	if (!(flags & MS_NOATIME))
  		mnt_flags |= MNT_RELATIME;
  
@@ -4914,7 +4565,7 @@ diff -NurpP --minimal linux-3.18.5/fs/namespace.c linux-3.18.5-vs2.3.7.3/fs/name
  	/* Separate the per-mountpoint flags */
  	if (flags & MS_NOSUID)
  		mnt_flags |= MNT_NOSUID;
-@@ -2628,15 +2649,17 @@ long do_mount(const char *dev_name, cons
+@@ -2791,15 +2812,17 @@ long do_mount(const char *dev_name, cons
  		mnt_flags |= path.mnt->mnt_flags & MNT_ATIME_MASK;
  	}
  
@@ -4934,7 +4585,7 @@ diff -NurpP --minimal linux-3.18.5/fs/namespace.c linux-3.18.5-vs2.3.7.3/fs/name
  	else if (flags & (MS_SHARED | MS_PRIVATE | MS_SLAVE | MS_UNBINDABLE))
  		retval = do_change_type(&path, flags);
  	else if (flags & MS_MOVE)
-@@ -2752,6 +2775,7 @@ struct mnt_namespace *copy_mnt_ns(unsign
+@@ -2919,6 +2942,7 @@ struct mnt_namespace *copy_mnt_ns(unsign
  			p = next_mnt(p, old);
  	}
  	namespace_unlock();
@@ -4942,7 +4593,7 @@ diff -NurpP --minimal linux-3.18.5/fs/namespace.c linux-3.18.5-vs2.3.7.3/fs/name
  
  	if (rootmnt)
  		mntput(rootmnt);
-@@ -2926,9 +2950,10 @@ SYSCALL_DEFINE2(pivot_root, const char _
+@@ -3094,9 +3118,10 @@ SYSCALL_DEFINE2(pivot_root, const char _
  	new_mnt = real_mount(new.mnt);
  	root_mnt = real_mount(root.mnt);
  	old_mnt = real_mount(old.mnt);
@@ -4955,7 +4606,7 @@ diff -NurpP --minimal linux-3.18.5/fs/namespace.c linux-3.18.5-vs2.3.7.3/fs/name
  		goto out4;
  	if (!check_mnt(root_mnt) || !check_mnt(new_mnt))
  		goto out4;
-@@ -3063,6 +3088,7 @@ void put_mnt_ns(struct mnt_namespace *ns
+@@ -3234,6 +3259,7 @@ void put_mnt_ns(struct mnt_namespace *ns
  	if (!atomic_dec_and_test(&ns->count))
  		return;
  	drop_collected_mounts(&ns->root->mnt);
@@ -4963,10 +4614,10 @@ diff -NurpP --minimal linux-3.18.5/fs/namespace.c linux-3.18.5-vs2.3.7.3/fs/name
  	free_mnt_ns(ns);
  }
  
-diff -NurpP --minimal linux-3.18.5/fs/nfs/client.c linux-3.18.5-vs2.3.7.3/fs/nfs/client.c
---- linux-3.18.5/fs/nfs/client.c	2015-01-17 02:40:19.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/nfs/client.c	2015-01-19 10:58:03.000000000 +0000
-@@ -693,6 +693,9 @@ int nfs_init_server_rpcclient(struct nfs
+diff -NurpP --minimal linux-4.4.110/fs/nfs/client.c linux-4.4.110-vs2.3.9/fs/nfs/client.c
+--- linux-4.4.110/fs/nfs/client.c	2016-07-05 04:15:08.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/nfs/client.c	2018-01-09 16:36:32.000000000 +0000
+@@ -583,6 +583,9 @@ int nfs_init_server_rpcclient(struct nfs
  	if (server->flags & NFS_MOUNT_SOFT)
  		server->client->cl_softrtry = 1;
  
@@ -4976,7 +4627,7 @@ diff -NurpP --minimal linux-3.18.5/fs/nfs/client.c linux-3.18.5-vs2.3.7.3/fs/nfs
  	return 0;
  }
  EXPORT_SYMBOL_GPL(nfs_init_server_rpcclient);
-@@ -871,6 +874,10 @@ static void nfs_server_set_fsinfo(struct
+@@ -760,6 +763,10 @@ static void nfs_server_set_fsinfo(struct
  		server->acdirmin = server->acdirmax = 0;
  	}
  
@@ -4987,9 +4638,9 @@ diff -NurpP --minimal linux-3.18.5/fs/nfs/client.c linux-3.18.5-vs2.3.7.3/fs/nfs
  	server->maxfilesize = fsinfo->maxfilesize;
  
  	server->time_delta = fsinfo->time_delta;
-diff -NurpP --minimal linux-3.18.5/fs/nfs/dir.c linux-3.18.5-vs2.3.7.3/fs/nfs/dir.c
---- linux-3.18.5/fs/nfs/dir.c	2015-01-17 02:40:19.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/nfs/dir.c	2015-01-19 10:58:03.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/nfs/dir.c linux-4.4.110-vs2.3.9/fs/nfs/dir.c
+--- linux-4.4.110/fs/nfs/dir.c	2018-01-09 16:35:07.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/nfs/dir.c	2018-01-09 16:36:32.000000000 +0000
 @@ -37,6 +37,7 @@
  #include <linux/sched.h>
  #include <linux/kmemleak.h>
@@ -4998,17 +4649,17 @@ diff -NurpP --minimal linux-3.18.5/fs/nfs/dir.c linux-3.18.5-vs2.3.7.3/fs/nfs/di
  
  #include "delegation.h"
  #include "iostat.h"
-@@ -1392,6 +1393,7 @@ struct dentry *nfs_lookup(struct inode *
+@@ -1396,6 +1397,7 @@ struct dentry *nfs_lookup(struct inode *
  	/* Success: notify readdir to use READDIRPLUS */
  	nfs_advise_use_readdirplus(dir);
  
 +	dx_propagate_tag(nd, inode);
  no_entry:
- 	res = d_materialise_unique(dentry, inode);
+ 	res = d_splice_alias(inode, dentry);
  	if (res != NULL) {
-diff -NurpP --minimal linux-3.18.5/fs/nfs/inode.c linux-3.18.5-vs2.3.7.3/fs/nfs/inode.c
---- linux-3.18.5/fs/nfs/inode.c	2015-01-17 02:40:19.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/nfs/inode.c	2015-01-19 11:44:24.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/nfs/inode.c linux-4.4.110-vs2.3.9/fs/nfs/inode.c
+--- linux-4.4.110/fs/nfs/inode.c	2018-01-09 16:35:07.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/nfs/inode.c	2018-01-09 16:36:32.000000000 +0000
 @@ -38,6 +38,7 @@
  #include <linux/slab.h>
  #include <linux/compat.h>
@@ -5017,7 +4668,7 @@ diff -NurpP --minimal linux-3.18.5/fs/nfs/inode.c linux-3.18.5-vs2.3.7.3/fs/nfs/
  
  #include <asm/uaccess.h>
  
-@@ -368,6 +369,8 @@ nfs_fhget(struct super_block *sb, struct
+@@ -376,6 +377,8 @@ nfs_fhget(struct super_block *sb, struct
  	if (inode->i_state & I_NEW) {
  		struct nfs_inode *nfsi = NFS_I(inode);
  		unsigned long now = jiffies;
@@ -5026,7 +4677,7 @@ diff -NurpP --minimal linux-3.18.5/fs/nfs/inode.c linux-3.18.5-vs2.3.7.3/fs/nfs/
  
  		/* We set i_ino for the few things that still rely on it,
  		 * such as stat(2) */
-@@ -412,8 +415,8 @@ nfs_fhget(struct super_block *sb, struct
+@@ -419,8 +422,8 @@ nfs_fhget(struct super_block *sb, struct
  		inode->i_version = 0;
  		inode->i_size = 0;
  		clear_nlink(inode);
@@ -5037,7 +4688,7 @@ diff -NurpP --minimal linux-3.18.5/fs/nfs/inode.c linux-3.18.5-vs2.3.7.3/fs/nfs/
  		inode->i_blocks = 0;
  		memset(nfsi->cookieverf, 0, sizeof(nfsi->cookieverf));
  		nfsi->write_io = 0;
-@@ -447,11 +450,11 @@ nfs_fhget(struct super_block *sb, struct
+@@ -455,11 +458,11 @@ nfs_fhget(struct super_block *sb, struct
  		else if (nfs_server_capable(inode, NFS_CAP_NLINK))
  			nfs_set_cache_invalid(inode, NFS_INO_INVALID_ATTR);
  		if (fattr->valid & NFS_ATTR_FATTR_OWNER)
@@ -5051,7 +4702,7 @@ diff -NurpP --minimal linux-3.18.5/fs/nfs/inode.c linux-3.18.5-vs2.3.7.3/fs/nfs/
  		else if (nfs_server_capable(inode, NFS_CAP_OWNER_GROUP))
  			nfs_set_cache_invalid(inode, NFS_INO_INVALID_ATTR);
  		if (fattr->valid & NFS_ATTR_FATTR_BLOCKS_USED)
-@@ -462,6 +465,10 @@ nfs_fhget(struct super_block *sb, struct
+@@ -470,6 +473,10 @@ nfs_fhget(struct super_block *sb, struct
  			 */
  			inode->i_blocks = nfs_calc_block_size(fattr->du.nfs3.used);
  		}
@@ -5062,7 +4713,7 @@ diff -NurpP --minimal linux-3.18.5/fs/nfs/inode.c linux-3.18.5-vs2.3.7.3/fs/nfs/
  
  		nfs_setsecurity(inode, fattr, label);
  
-@@ -592,6 +599,8 @@ void nfs_setattr_update_inode(struct ino
+@@ -611,6 +618,8 @@ void nfs_setattr_update_inode(struct ino
  			inode->i_uid = attr->ia_uid;
  		if ((attr->ia_valid & ATTR_GID) != 0)
  			inode->i_gid = attr->ia_gid;
@@ -5070,8 +4721,8 @@ diff -NurpP --minimal linux-3.18.5/fs/nfs/inode.c linux-3.18.5-vs2.3.7.3/fs/nfs/
 +			inode->i_tag = attr->ia_tag;
  		nfs_set_cache_invalid(inode, NFS_INO_INVALID_ACCESS
  				| NFS_INO_INVALID_ACL);
- 		spin_unlock(&inode->i_lock);
-@@ -1171,7 +1180,9 @@ static int nfs_check_inode_attributes(st
+ 	}
+@@ -1235,7 +1244,9 @@ static int nfs_check_inode_attributes(st
  	struct nfs_inode *nfsi = NFS_I(inode);
  	loff_t cur_size, new_isize;
  	unsigned long invalid = 0;
@@ -5082,9 +4733,9 @@ diff -NurpP --minimal linux-3.18.5/fs/nfs/inode.c linux-3.18.5-vs2.3.7.3/fs/nfs/
  
  	if (nfs_have_delegated_attributes(inode))
  		return 0;
-@@ -1196,13 +1207,18 @@ static int nfs_check_inode_attributes(st
- 			invalid |= NFS_INO_INVALID_ATTR|NFS_INO_REVAL_PAGECACHE;
- 	}
+@@ -1262,13 +1273,18 @@ static int nfs_check_inode_attributes(st
+ 	if (nfsi->nrequests != 0)
+ 		invalid &= ~NFS_INO_REVAL_PAGECACHE;
  
 +	kuid = INOTAG_KUID(DX_TAG(inode), fattr->uid, fattr->gid);
 +	kgid = INOTAG_KGID(DX_TAG(inode), fattr->uid, fattr->gid);
@@ -5103,19 +4754,19 @@ diff -NurpP --minimal linux-3.18.5/fs/nfs/inode.c linux-3.18.5-vs2.3.7.3/fs/nfs/
  
  	/* Has the link count changed? */
  	if ((fattr->valid & NFS_ATTR_FATTR_NLINK) && inode->i_nlink != fattr->nlink)
-@@ -1533,6 +1549,9 @@ static int nfs_update_inode(struct inode
- 	unsigned long invalid = 0;
+@@ -1642,6 +1658,9 @@ static int nfs_update_inode(struct inode
  	unsigned long now = jiffies;
  	unsigned long save_cache_validity;
+ 	bool cache_revalidated = true;
 +	kuid_t kuid;
 +	kgid_t kgid;
 +	ktag_t ktag;
  
  	dfprintk(VFS, "NFS: %s(%s/%lu fh_crc=0x%08x ct=%d info=0x%x)\n",
  			__func__, inode->i_sb->s_id, inode->i_ino,
-@@ -1637,6 +1656,9 @@ static int nfs_update_inode(struct inode
- 				| NFS_INO_REVAL_PAGECACHE
- 				| NFS_INO_REVAL_FORCED);
+@@ -1752,6 +1771,9 @@ static int nfs_update_inode(struct inode
+ 		cache_revalidated = false;
+ 	}
  
 +	kuid = TAGINO_KUID(DX_TAG(inode), inode->i_uid, inode->i_tag);
 +	kgid = TAGINO_KGID(DX_TAG(inode), inode->i_gid, inode->i_tag);
@@ -5123,9 +4774,9 @@ diff -NurpP --minimal linux-3.18.5/fs/nfs/inode.c linux-3.18.5-vs2.3.7.3/fs/nfs/
  
  	if (fattr->valid & NFS_ATTR_FATTR_ATIME)
  		memcpy(&inode->i_atime, &fattr->atime, sizeof(inode->i_atime));
-@@ -1683,6 +1705,10 @@ static int nfs_update_inode(struct inode
- 				| NFS_INO_INVALID_ACL
- 				| NFS_INO_REVAL_FORCED);
+@@ -1806,6 +1828,10 @@ static int nfs_update_inode(struct inode
+ 		cache_revalidated = false;
+ 	}
  
 +	inode->i_uid = INOTAG_KUID(DX_TAG(inode), kuid, kgid);
 +	inode->i_gid = INOTAG_KGID(DX_TAG(inode), kuid, kgid);
@@ -5134,9 +4785,9 @@ diff -NurpP --minimal linux-3.18.5/fs/nfs/inode.c linux-3.18.5-vs2.3.7.3/fs/nfs/
  	if (fattr->valid & NFS_ATTR_FATTR_NLINK) {
  		if (inode->i_nlink != fattr->nlink) {
  			invalid |= NFS_INO_INVALID_ATTR;
-diff -NurpP --minimal linux-3.18.5/fs/nfs/nfs3xdr.c linux-3.18.5-vs2.3.7.3/fs/nfs/nfs3xdr.c
---- linux-3.18.5/fs/nfs/nfs3xdr.c	2014-09-03 13:19:40.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/nfs/nfs3xdr.c	2015-01-19 10:58:03.000000000 +0000
+diff -NurpP --minimal linux-4.4.110/fs/nfs/nfs3xdr.c linux-4.4.110-vs2.3.9/fs/nfs/nfs3xdr.c
+--- linux-4.4.110/fs/nfs/nfs3xdr.c	2016-07-05 04:12:33.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/nfs/nfs3xdr.c	2018-01-09 17:17:07.000000000 +0000
 @@ -20,6 +20,7 @@
  #include <linux/nfs3.h>
  #include <linux/nfs_fs.h>
@@ -5240,10 +4891,10 @@ diff -NurpP --minimal linux-3.18.5/fs/nfs/nfs3xdr.c linux-3.18.5-vs2.3.7.3/fs/nf
  	encode_diropargs3(xdr, args->fromfh, args->fromname, args->fromlen);
 -	encode_symlinkdata3(xdr, args);
 +	encode_symlinkdata3(xdr, args, req->rq_task->tk_client->cl_tag);
+ 	xdr->buf->flags |= XDRBUF_WRITE;
  }
  
- /*
-@@ -1130,24 +1136,24 @@ static void nfs3_xdr_enc_symlink3args(st
+@@ -1131,24 +1137,24 @@ static void nfs3_xdr_enc_symlink3args(st
   *	};
   */
  static void encode_devicedata3(struct xdr_stream *xdr,
@@ -5273,7 +4924,7 @@ diff -NurpP --minimal linux-3.18.5/fs/nfs/nfs3xdr.c linux-3.18.5-vs2.3.7.3/fs/nf
  		break;
  	case NF3REG:
  	case NF3DIR:
-@@ -1162,7 +1168,7 @@ static void nfs3_xdr_enc_mknod3args(stru
+@@ -1163,7 +1169,7 @@ static void nfs3_xdr_enc_mknod3args(stru
  				    const struct nfs3_mknodargs *args)
  {
  	encode_diropargs3(xdr, args->fh, args->name, args->len);
@@ -5282,10 +4933,10 @@ diff -NurpP --minimal linux-3.18.5/fs/nfs/nfs3xdr.c linux-3.18.5-vs2.3.7.3/fs/nf
  }
  
  /*
-diff -NurpP --minimal linux-3.18.5/fs/nfs/super.c linux-3.18.5-vs2.3.7.3/fs/nfs/super.c
---- linux-3.18.5/fs/nfs/super.c	2015-01-17 02:40:19.000000000 +0000
-+++ linux-3.18.5-vs2.3.7.3/fs/nfs/super.c	2015-01-19 10:58:03.000000000 +0000
-@@ -55,6 +55,7 @@
+diff -NurpP --minimal linux-4.4.110/fs/nfs/super.c linux-4.4.110-vs2.3.9/fs/nfs/super.c
+--- linux-4.4.110/fs/nfs/super.c	2018-01-09 16:35:07.000000000 +0000
++++ linux-4.4.110-vs2.3.9/fs/nfs/super.c	2018-01-09 16:36:32.000000000 +0000
+@@ -54,6 +54,7 @@
  #include <linux/parser.h>
  #include <linux/nsproxy.h>
  #include <linux/rcupdate.h>
@@ -5293,7 +4944,7 @@ diff -NurpP --minimal linux-3.18.5/fs/nfs/super.c linux-3.18.5-vs2.3.7.3/fs/nfs/
  
  #include <asm/uaccess.h>
  
-@@ -103,6 +104,7 @@ enum {
+@@ -102,6 +103,7 @@ enum {
  	Opt_mountport,
  	Opt_mountvers,
  	Opt_minorversion,
@@ -5301,7 +4952,7 @@ diff -NurpP --minimal linux-3.18.5/fs/nfs/super.c linux-3.18.5-vs2.3.7.3/fs/nfs/
  
  	/* Mount options that take string arguments */
  	Opt_nfsvers,
-@@ -115,6 +117,9 @@ enum {
+@@ -114,6 +116,9 @@ enum {
  	/* Special mount options */
  	Opt_userspace, Opt_deprecated, Opt_sloppy,
  
@@ -5311,7 +4962,7 @@ diff -NurpP --minimal linux-3.18.5/fs/nfs/super.c linux-3.18.5-vs2.3.7.3/fs/nfs/
  	Opt_err
  };
  
-@@ -184,6 +189,10 @@ static const match_table_t nfs_mount_opt
+@@ -183,6 +188,10 @@ static const match_table_t nfs_mount_opt
  	{ Opt_fscache_uniq, "fsc=%s" },
  	{ Opt_local_lock, "local_lock=%s" },
<Skipped 7371 lines>
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/kernel.git/commitdiff/927ca60654861dc82f5056f216161dc7efc4c826



More information about the pld-cvs-commit mailing list