packages (LINUX_2_6_39): kernel/kernel.spec, kernel/kernel-unionfs.patch, k...
arekm
arekm at pld-linux.org
Fri Sep 30 10:03:07 CEST 2011
Author: arekm Date: Fri Sep 30 08:03:07 2011 GMT
Module: packages Tag: LINUX_2_6_39
---- Log message:
- update to 2.6.39.4 + some patches updated (apparmor, routes, tuxonice, unionfs)
---- Files affected:
packages/kernel:
kernel.spec (1.930 -> 1.930.2.1) , kernel-unionfs.patch (1.13 -> 1.13.2.1) , kernel-tuxonice.patch (1.24 -> 1.24.2.1)
---- Diffs:
================================================================
Index: packages/kernel/kernel.spec
diff -u packages/kernel/kernel.spec:1.930 packages/kernel/kernel.spec:1.930.2.1
--- packages/kernel/kernel.spec:1.930 Tue Jul 5 22:39:19 2011
+++ packages/kernel/kernel.spec Fri Sep 30 10:03:01 2011
@@ -94,7 +94,7 @@
%endif
%define basever 2.6.39
-%define postver .2
+%define postver .4
%define rel 0.1
%define _enable_debug_packages 0
@@ -142,7 +142,7 @@
# Source0-md5: 1aab7a741abe08d42e8eccf20de61e05
%if "%{postver}" != "%{nil}"
Source1: http://www.kernel.org/pub/linux/kernel/v2.6/patch-%{version}.bz2
-# Source1-md5: 6f81e64e790eb7847773eec4f7cbf207
+# Source1-md5: ff5eb7323c054a128d2922bde3297ed5
%endif
Source3: kernel-autoconf.h
@@ -231,8 +231,7 @@
Patch59: kernel-rndis_host-wm5.patch
# Project suspend2 renamed to tuxonice
-# http://tuxonice.net/files/current-tuxonice-for-2.6.37.patch_0.bz2
-# NOTE: currently using own diff from tuxonice git tree until official patch is released
+# http://tuxonice.net/files/current-tuxonice-for-2.6.39.patch.bz2
Patch69: kernel-tuxonice.patch
Patch70: kernel-tuxonice-headers.patch
@@ -248,7 +247,7 @@
# Fix verified for that kernel version.
Patch130: kernel-forcedeth-WON.patch
-# http://download.filesystems.org/unionfs/unionfs-2.x/unionfs-2.5.8_for_2.6.38-rc7.diff.gz
+# http://download.filesystems.org/unionfs/unionfs-2.x/unionfs-2.5.9.2_for_2.6.39.2.diff.gz
Patch140: kernel-unionfs.patch
# http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git, read README
@@ -274,7 +273,7 @@
# alternative routes, the reverse path protection (rp_filter),
# the NAT processing to use correctly the routing when multiple
# gateways are used.
-# http://www.ssi.bg/~ja/routes-2.6.38-16.diff
+# http://www.ssi.bg/~ja/routes-2.6.39-17.diff
Patch300: kernel-routes.patch
# https://patchwork.kernel.org/patch/236261/
@@ -284,11 +283,9 @@
Patch2001: kernel-pwc-uncompress.patch
Patch2003: kernel-regressions.patch
-Patch2200: kernel-xfs-delaylog.patch
-
# 0001-AppArmor-compatibility-patch-for-v5-network-controll.patch
# 0002-AppArmor-compatibility-patch-for-v5-interface.patch
-# from http://kernel.org/pub/linux/security/apparmor/apparmor-2.6.36-patches.tgz
+# from http://kernel.org/pub/linux/security/apparmor/apparmor-2.6.39-patches.tgz
Patch5000: kernel-apparmor.patch
# for rescuecd
@@ -772,8 +769,6 @@
# unionfs
%patch140 -p1
-%patch2200 -p1
-
%if %{with rescuecd}
%patch7000 -p1
%endif
@@ -1418,7 +1413,7 @@
%ifarch ppc ppc64
%{_kernelsrcdir}/arch/powerpc/lib/crtsavres.*
%endif
-%exclude %dir %{_kernelsrcdir}/arch/m68knommu
+%exclude %dir %{_kernelsrcdir}/arch/m68k
%exclude %dir %{_kernelsrcdir}/arch/um
%{_kernelsrcdir}/arch/*/kernel/asm-offsets*
%{_kernelsrcdir}/arch/*/kernel/sigframe*.h
@@ -1538,6 +1533,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.930.2.1 2011/09/30 08:03:01 arekm
+- update to 2.6.39.4 + some patches updated (apparmor, routes, tuxonice, unionfs)
+
Revision 1.930 2011/07/05 20:39:19 wrobell
- resurrected small fixes patch
- removed already applied chunks
================================================================
Index: packages/kernel/kernel-unionfs.patch
diff -u packages/kernel/kernel-unionfs.patch:1.13 packages/kernel/kernel-unionfs.patch:1.13.2.1
--- packages/kernel/kernel-unionfs.patch:1.13 Fri Mar 25 16:08:26 2011
+++ packages/kernel/kernel-unionfs.patch Fri Sep 30 10:03:02 2011
@@ -532,10 +532,10 @@
+
+For more information, see <http://unionfs.filesystems.org/>.
diff --git a/MAINTAINERS b/MAINTAINERS
-index 560ecce..09e38d6 100644
+index 69f19f1..fd88a30 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
-@@ -6276,6 +6276,14 @@ F: Documentation/cdrom/
+@@ -6319,6 +6319,14 @@ F: Documentation/cdrom/
F: drivers/cdrom/cdrom.c
F: include/linux/cdrom.h
@@ -551,7 +551,7 @@
M: Artem Bityutskiy <dedekind1 at gmail.com>
W: http://www.linux-mtd.infradead.org/
diff --git a/fs/Kconfig b/fs/Kconfig
-index 3db9caa..3dc2dfd 100644
+index f3aa9b0..0e6182c 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -170,6 +170,7 @@ if MISC_FILESYSTEMS
@@ -563,10 +563,10 @@
source "fs/hfsplus/Kconfig"
source "fs/befs/Kconfig"
diff --git a/fs/Makefile b/fs/Makefile
-index a7f7cef..672664b 100644
+index fb68c2b..8ca9290 100644
--- a/fs/Makefile
+++ b/fs/Makefile
-@@ -81,6 +81,7 @@ obj-$(CONFIG_ISO9660_FS) += isofs/
+@@ -83,6 +83,7 @@ obj-$(CONFIG_ISO9660_FS) += isofs/
obj-$(CONFIG_HFSPLUS_FS) += hfsplus/ # Before hfs to find wrapped HFS+
obj-$(CONFIG_HFS_FS) += hfs/
obj-$(CONFIG_ECRYPT_FS) += ecryptfs/
@@ -575,10 +575,10 @@
obj-$(CONFIG_NFS_FS) += nfs/
obj-$(CONFIG_EXPORTFS) += exportfs/
diff --git a/fs/namei.c b/fs/namei.c
-index 0087cf9..d3118a7 100644
+index 6ff858c..6b286ee 100644
--- a/fs/namei.c
+++ b/fs/namei.c
-@@ -562,6 +562,7 @@ void release_open_intent(struct nameidata *nd)
+@@ -578,6 +578,7 @@ void release_open_intent(struct nameidata *nd)
fput(file);
}
}
@@ -586,8 +586,59 @@
static inline int d_revalidate(struct dentry *dentry, struct nameidata *nd)
{
+@@ -1819,6 +1820,42 @@ struct dentry *lookup_one_len(const char *name, struct dentry *base, int len)
+ return __lookup_hash(&this, base, NULL);
+ }
+
++/* pass nameidata from caller (useful for NFS) */
++struct dentry *lookup_one_len_nd(const char *name, struct dentry *base,
++ int len, struct nameidata *nd)
++{
++ struct qstr this;
++ unsigned long hash;
++ unsigned int c;
++
++ WARN_ON_ONCE(!mutex_is_locked(&base->d_inode->i_mutex));
++
++ this.name = name;
++ this.len = len;
++ if (!len)
++ return ERR_PTR(-EACCES);
++
++ hash = init_name_hash();
++ while (len--) {
++ c = *(const unsigned char *)name++;
++ if (c == '/' || c == '\0')
++ return ERR_PTR(-EACCES);
++ hash = partial_name_hash(c, hash);
++ }
++ this.hash = end_name_hash(hash);
++ /*
++ * See if the low-level filesystem might want
++ * to use its own hash..
++ */
++ if (base->d_flags & DCACHE_OP_HASH) {
++ int err = base->d_op->d_hash(base, base->d_inode, &this);
++ if (err < 0)
++ return ERR_PTR(err);
++ }
++
++ return __lookup_hash(&this, base, nd);
++}
++
+ int user_path_at(int dfd, const char __user *name, unsigned flags,
+ struct path *path)
+ {
+@@ -3422,6 +3459,7 @@ EXPORT_SYMBOL(get_write_access); /* binfmt_aout */
+ EXPORT_SYMBOL(getname);
+ EXPORT_SYMBOL(lock_rename);
+ EXPORT_SYMBOL(lookup_one_len);
++EXPORT_SYMBOL(lookup_one_len_nd);
+ EXPORT_SYMBOL(page_follow_link_light);
+ EXPORT_SYMBOL(page_put_link);
+ EXPORT_SYMBOL(page_readlink);
diff --git a/fs/splice.c b/fs/splice.c
-index 50a5d97..a3af841 100644
+index 50a5d978..a3af841 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1081,8 +1081,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
@@ -723,11 +774,11 @@
+ If you say Y here, you can turn on debugging output from Unionfs.
diff --git a/fs/unionfs/Makefile b/fs/unionfs/Makefile
new file mode 100644
-index 0000000..10a321a
+index 0000000..ae89538
--- /dev/null
+++ b/fs/unionfs/Makefile
@@ -0,0 +1,17 @@
-+UNIONFS_VERSION="2.5.8 (for 2.6.38-rc7)"
++UNIONFS_VERSION="2.5.9.2 (for 2.6.39.2)"
+
+EXTRA_CFLAGS += -DUNIONFS_VERSION=\"$(UNIONFS_VERSION)\"
+
@@ -746,12 +797,12 @@
+endif
diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c
new file mode 100644
-index 0000000..51ea65e
+index 0000000..0a271f4
--- /dev/null
+++ b/fs/unionfs/commonfops.c
@@ -0,0 +1,896 @@
+/*
-+ * Copyright (c) 2003-2010 Erez Zadok
++ * Copyright (c) 2003-2011 Erez Zadok
+ * Copyright (c) 2003-2006 Charles P. Wright
+ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek
+ * Copyright (c) 2005-2006 Junjiro Okajima
@@ -760,8 +811,8 @@
+ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
+ * Copyright (c) 2003 Puja Gupta
+ * Copyright (c) 2003 Harikesavan Krishnan
-+ * Copyright (c) 2003-2010 Stony Brook University
-+ * Copyright (c) 2003-2010 The Research Foundation of SUNY
++ * Copyright (c) 2003-2011 Stony Brook University
++ * Copyright (c) 2003-2011 The Research Foundation of SUNY
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
@@ -1064,7 +1115,7 @@
+ * someone has copied up this file from underneath us, we also need
+ * to refresh things.
+ */
-+ if (d_deleted(dentry) ||
++ if ((d_deleted(dentry) && dbstart(dentry) >= fbstart(file)) ||
+ (sbgen <= fgen &&
+ dbstart(dentry) == fbstart(file) &&
+ unionfs_lower_file(file)))
@@ -1258,8 +1309,11 @@
+ for (bindex = bstart - 1; bindex >= 0; bindex--) {
+ err = copyup_file(parent->d_inode, file,
+ bstart, bindex, size);
-+ if (!err)
++ if (!err) {
++ /* only one regular file open */
++ fbend(file) = fbstart(file);
+ break;
++ }
+ }
+ return err;
+ } else {
@@ -1400,7 +1454,7 @@
+ struct dentry *dentry = file->f_path.dentry;
+ struct dentry *parent;
+ int bindex, bstart, bend;
-+ int fgen, err = 0;
++ int err = 0;
+
+ /*
+ * Since mm/memory.c:might_fault() (under PROVE_LOCKING) was
@@ -1436,7 +1490,6 @@
+ inodeinfo = UNIONFS_I(inode);
+
+ /* fput all the lower files */
-+ fgen = atomic_read(&fileinfo->generation);
+ bstart = fbstart(file);
+ bend = fbend(file);
+
@@ -1492,10 +1545,8 @@
+ if (lower_file->f_op->unlocked_ioctl) {
+ err = lower_file->f_op->unlocked_ioctl(lower_file, cmd, arg);
+#ifdef CONFIG_COMPAT
-+ } else if (lower_file->f_op->ioctl) {
-+ err = lower_file->f_op->compat_ioctl(
-+ lower_file->f_path.dentry->d_inode,
-+ lower_file, cmd, arg);
++ } else if (lower_file->f_op->compat_ioctl) {
++ err = lower_file->f_op->compat_ioctl(lower_file, cmd, arg);
+#endif
+ }
+
@@ -1648,12 +1699,12 @@
+}
diff --git a/fs/unionfs/copyup.c b/fs/unionfs/copyup.c
new file mode 100644
-index 0000000..bba3a75
+index 0000000..37c2654
--- /dev/null
+++ b/fs/unionfs/copyup.c
@@ -0,0 +1,896 @@
+/*
-+ * Copyright (c) 2003-2010 Erez Zadok
++ * Copyright (c) 2003-2011 Erez Zadok
+ * Copyright (c) 2003-2006 Charles P. Wright
+ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek
+ * Copyright (c) 2005-2006 Junjiro Okajima
@@ -1662,8 +1713,8 @@
+ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
+ * Copyright (c) 2003 Puja Gupta
+ * Copyright (c) 2003 Harikesavan Krishnan
-+ * Copyright (c) 2003-2010 Stony Brook University
-+ * Copyright (c) 2003-2010 The Research Foundation of SUNY
++ * Copyright (c) 2003-2011 Stony Brook University
++ * Copyright (c) 2003-2011 The Research Foundation of SUNY
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
@@ -2550,15 +2601,15 @@
+}
diff --git a/fs/unionfs/debug.c b/fs/unionfs/debug.c
new file mode 100644
-index 0000000..a76f92a
+index 0000000..6092e69
--- /dev/null
+++ b/fs/unionfs/debug.c
@@ -0,0 +1,548 @@
+/*
-+ * Copyright (c) 2003-2010 Erez Zadok
++ * Copyright (c) 2003-2011 Erez Zadok
+ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek
-+ * Copyright (c) 2003-2010 Stony Brook University
-+ * Copyright (c) 2003-2010 The Research Foundation of SUNY
++ * Copyright (c) 2003-2011 Stony Brook University
++ * Copyright (c) 2003-2011 The Research Foundation of SUNY
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
@@ -3104,12 +3155,12 @@
+}
diff --git a/fs/unionfs/dentry.c b/fs/unionfs/dentry.c
new file mode 100644
-index 0000000..a0c3bba
+index 0000000..c0205a4
--- /dev/null
+++ b/fs/unionfs/dentry.c
-@@ -0,0 +1,397 @@
+@@ -0,0 +1,406 @@
+/*
-+ * Copyright (c) 2003-2010 Erez Zadok
++ * Copyright (c) 2003-2011 Erez Zadok
+ * Copyright (c) 2003-2006 Charles P. Wright
+ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek
+ * Copyright (c) 2005-2006 Junjiro Okajima
@@ -3118,8 +3169,8 @@
+ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
+ * Copyright (c) 2003 Puja Gupta
+ * Copyright (c) 2003 Harikesavan Krishnan
-+ * Copyright (c) 2003-2010 Stony Brook University
-+ * Copyright (c) 2003-2010 The Research Foundation of SUNY
++ * Copyright (c) 2003-2011 Stony Brook University
++ * Copyright (c) 2003-2011 The Research Foundation of SUNY
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
@@ -3302,6 +3353,9 @@
+ bend = dbend(dentry);
+ BUG_ON(bstart == -1);
+ for (bindex = bstart; bindex <= bend; bindex++) {
++ int err;
++ struct nameidata lower_nd;
++
+ lower_dentry = unionfs_lower_dentry_idx(dentry, bindex);
+ if (!lower_dentry || !lower_dentry->d_op
+ || !lower_dentry->d_op->d_revalidate)
@@ -3314,8 +3368,14 @@
+ * invariants). We will open lower files as and when needed
+ * later on.
+ */
-+ if (!lower_dentry->d_op->d_revalidate(lower_dentry, NULL))
++ err = init_lower_nd(&lower_nd, LOOKUP_OPEN);
++ if (unlikely(err < 0)) {
++ valid = false;
++ break;
++ }
++ if (!lower_dentry->d_op->d_revalidate(lower_dentry, &lower_nd))
+ valid = false;
++ release_lower_nd(&lower_nd, err);
+ }
+
+ if (!dentry->d_inode ||
@@ -3507,12 +3567,12 @@
+};
diff --git a/fs/unionfs/dirfops.c b/fs/unionfs/dirfops.c
new file mode 100644
-index 0000000..7da0ff0
+index 0000000..72a9c1a
--- /dev/null
+++ b/fs/unionfs/dirfops.c
@@ -0,0 +1,302 @@
+/*
-+ * Copyright (c) 2003-2010 Erez Zadok
++ * Copyright (c) 2003-2011 Erez Zadok
+ * Copyright (c) 2003-2006 Charles P. Wright
+ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek
+ * Copyright (c) 2005-2006 Junjiro Okajima
@@ -3521,8 +3581,8 @@
+ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
+ * Copyright (c) 2003 Puja Gupta
+ * Copyright (c) 2003 Harikesavan Krishnan
-+ * Copyright (c) 2003-2010 Stony Brook University
-+ * Copyright (c) 2003-2010 The Research Foundation of SUNY
++ * Copyright (c) 2003-2011 Stony Brook University
++ * Copyright (c) 2003-2011 The Research Foundation of SUNY
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
@@ -3815,12 +3875,12 @@
+};
diff --git a/fs/unionfs/dirhelper.c b/fs/unionfs/dirhelper.c
new file mode 100644
-index 0000000..033343b
+index 0000000..62ec9af
--- /dev/null
+++ b/fs/unionfs/dirhelper.c
@@ -0,0 +1,158 @@
+/*
-+ * Copyright (c) 2003-2010 Erez Zadok
++ * Copyright (c) 2003-2011 Erez Zadok
+ * Copyright (c) 2003-2006 Charles P. Wright
+ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek
+ * Copyright (c) 2005-2006 Junjiro Okajima
@@ -3829,8 +3889,8 @@
+ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
+ * Copyright (c) 2003 Puja Gupta
+ * Copyright (c) 2003 Harikesavan Krishnan
-+ * Copyright (c) 2003-2010 Stony Brook University
-+ * Copyright (c) 2003-2010 The Research Foundation of SUNY
++ * Copyright (c) 2003-2011 Stony Brook University
++ * Copyright (c) 2003-2011 The Research Foundation of SUNY
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
@@ -3979,12 +4039,12 @@
+}
diff --git a/fs/unionfs/fanout.h b/fs/unionfs/fanout.h
new file mode 100644
-index 0000000..5b77eac
+index 0000000..ae1b86a
--- /dev/null
+++ b/fs/unionfs/fanout.h
@@ -0,0 +1,407 @@
+/*
-+ * Copyright (c) 2003-2010 Erez Zadok
++ * Copyright (c) 2003-2011 Erez Zadok
+ * Copyright (c) 2003-2006 Charles P. Wright
+ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek
+ * Copyright (c) 2005 Arun M. Krishnakumar
@@ -3992,8 +4052,8 @@
+ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
+ * Copyright (c) 2003 Puja Gupta
+ * Copyright (c) 2003 Harikesavan Krishnan
-+ * Copyright (c) 2003-2010 Stony Brook University
-+ * Copyright (c) 2003-2010 The Research Foundation of SUNY
++ * Copyright (c) 2003-2011 Stony Brook University
++ * Copyright (c) 2003-2011 The Research Foundation of SUNY
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
@@ -4392,12 +4452,12 @@
+#endif /* not _FANOUT_H */
diff --git a/fs/unionfs/file.c b/fs/unionfs/file.c
new file mode 100644
-index 0000000..1c694c3
+index 0000000..416c52f
--- /dev/null
+++ b/fs/unionfs/file.c
@@ -0,0 +1,382 @@
+/*
-+ * Copyright (c) 2003-2010 Erez Zadok
++ * Copyright (c) 2003-2011 Erez Zadok
+ * Copyright (c) 2003-2006 Charles P. Wright
+ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek
+ * Copyright (c) 2005-2006 Junjiro Okajima
@@ -4406,8 +4466,8 @@
+ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
+ * Copyright (c) 2003 Puja Gupta
+ * Copyright (c) 2003 Harikesavan Krishnan
-+ * Copyright (c) 2003-2010 Stony Brook University
-+ * Copyright (c) 2003-2010 The Research Foundation of SUNY
++ * Copyright (c) 2003-2011 Stony Brook University
++ * Copyright (c) 2003-2011 The Research Foundation of SUNY
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
@@ -4780,12 +4840,12 @@
+};
diff --git a/fs/unionfs/inode.c b/fs/unionfs/inode.c
new file mode 100644
-index 0000000..0066238
+index 0000000..b207c13
--- /dev/null
+++ b/fs/unionfs/inode.c
-@@ -0,0 +1,1077 @@
+@@ -0,0 +1,1099 @@
+/*
-+ * Copyright (c) 2003-2010 Erez Zadok
++ * Copyright (c) 2003-2011 Erez Zadok
+ * Copyright (c) 2003-2006 Charles P. Wright
+ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek
+ * Copyright (c) 2005-2006 Junjiro Okajima
@@ -4794,8 +4854,8 @@
+ * Copyright (c) 2003-2004 Mohammad Nayyer Zubair
+ * Copyright (c) 2003 Puja Gupta
+ * Copyright (c) 2003 Harikesavan Krishnan
-+ * Copyright (c) 2003-2010 Stony Brook University
-+ * Copyright (c) 2003-2010 The Research Foundation of SUNY
++ * Copyright (c) 2003-2011 Stony Brook University
++ * Copyright (c) 2003-2011 The Research Foundation of SUNY
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
@@ -5575,17 +5635,23 @@
+ struct inode *lower_inode = NULL;
+ int err = 0;
+ int bindex, bstart, bend;
-+ const int is_file = !S_ISDIR(inode->i_mode);
++ int is_file;
+ const int write_mask = (mask & MAY_WRITE) && !(mask & MAY_READ);
-+ struct inode *inode_grabbed = igrab(inode);
-+ struct dentry *dentry = d_find_alias(inode);
++ struct inode *inode_grabbed;
++ struct dentry *dentry;
+
-+ if (flags & IPERM_FLAG_RCU)
-+ return -ECHILD;
++ if (flags & IPERM_FLAG_RCU) {
++ err = -ECHILD;
++ goto out_nograb;
++ }
+
++ dentry = d_find_alias(inode);
+ if (dentry)
+ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD);
+
++ inode_grabbed = igrab(inode);
++ is_file = !S_ISDIR(inode->i_mode);
++
+ if (!UNIONFS_I(inode)->lower_inodes) {
+ if (is_file) /* dirs can be unlinked but chdir'ed to */
+ err = -ESTALE; /* force revalidate */
@@ -5678,6 +5744,7 @@
+ dput(dentry);
+ }
+ iput(inode_grabbed);
++out_nograb:
+ return err;
+}
+
@@ -5722,7 +5789,12 @@
+ err = -EINVAL;
+ goto out;
+ }
-+ lower_inode = unionfs_lower_inode(inode);
++
++ /*
++ * Get the lower inode directly from lower dentry, in case ibstart
++ * is -1 (which happens when the file is open but unlinked.
++ */
++ lower_inode = lower_dentry->d_inode;
+
+ /* check if user has permission to change lower inode */
+ err = inode_change_ok(lower_inode, ia);
@@ -5757,6 +5829,16 @@
+ /* get updated lower_dentry/inode after copyup */
+ lower_dentry = unionfs_lower_dentry(dentry);
+ lower_inode = unionfs_lower_inode(inode);
++ /*
++ * check for whiteouts in writeable branch, and remove them
++ * if necessary.
++ */
++ if (lower_dentry) {
++ err = check_unlink_whiteout(dentry, lower_dentry,
++ bindex);
++ if (err > 0) /* ignore if whiteout found and removed */
++ err = 0;
++ }
+ }
+
+ /*
@@ -5863,12 +5945,12 @@
<<Diff was trimmed, longer than 597 lines>>
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel.spec?r1=1.930&r2=1.930.2.1&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-unionfs.patch?r1=1.13&r2=1.13.2.1&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-tuxonice.patch?r1=1.24&r2=1.24.2.1&f=u
More information about the pld-cvs-commit
mailing list