From df3e168a40be1339f6a47bb551c49edefb761b3f Mon Sep 17 00:00:00 2001 From: Sapan Bhatia Date: Tue, 31 May 2011 00:43:46 -0400 Subject: [PATCH] Cow fix for 2.6.32+ --- kernel-2.6.spec | 2 ++ linux-2.6-255-vserver-delta-cow-fix23.diff | 13 +++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 linux-2.6-255-vserver-delta-cow-fix23.diff diff --git a/kernel-2.6.spec b/kernel-2.6.spec index fd3a70f4f..53fa2f393 100644 --- a/kernel-2.6.spec +++ b/kernel-2.6.spec @@ -668,6 +668,7 @@ Source82: config-s390x-debug Source83: config-s390x-debug-rhel Patch1: patch-2.6.32-71.24.1.el6-vs2.3.0.36.29.6.diff +Patch2: linux-2.6-255-vserver-delta-cow-fix23.diff Patch3: linux-2.6-250-ipsets.patch Patch4: linux-2.6-510-ipod.patch Patch5: linux-2.6-521-packet-tagging.patch @@ -964,6 +965,7 @@ make -f %{SOURCE20} VERSION=%{version} configs #### Planet-Lab #### ApplyPatch patch-2.6.32-71.24.1.el6-vs2.3.0.36.29.6.diff ApplyPatch linux-2.6-250-ipsets.patch +ApplyPatch linux-2.6-255-vserver-delta-cow-fix23.diff ApplyPatch linux-2.6-510-ipod.patch ApplyPatch linux-2.6-521-packet-tagging.patch ApplyPatch linux-2.6-522-iptables-connection-tagging.patch diff --git a/linux-2.6-255-vserver-delta-cow-fix23.diff b/linux-2.6-255-vserver-delta-cow-fix23.diff new file mode 100644 index 000000000..dc5b7245e --- /dev/null +++ b/linux-2.6-255-vserver-delta-cow-fix23.diff @@ -0,0 +1,13 @@ +diff -NurpP linux-2.6.38.7-vs2.3.0.37-rc15/fs/namei.c linux-2.6.38.7-vs2.3.0.37-rc15.1/fs/namei.c +--- linux-2.6.38.7-vs2.3.0.37-rc15/fs/namei.c 2011-04-23 22:33:35.000000000 +0200 ++++ linux-2.6.38.7-vs2.3.0.37-rc15.1/fs/namei.c 2011-05-29 22:41:46.000000000 +0200 +@@ -2220,7 +2220,8 @@ int may_open(struct path *path, int acc_ + } + + #ifdef CONFIG_VSERVER_COWBL +- if (IS_COW(inode) && (flag & FMODE_WRITE)) { ++ if (IS_COW(inode) && ++ ((flag & O_ACCMODE) != O_RDONLY)) { + if (IS_COW_LINK(inode)) + return -EMLINK; + inode->i_flags &= ~(S_IXUNLINK|S_IMMUTABLE); -- 2.43.0