packages: kernel/kernel-unionfs.patch, kernel/kernel.spec - update union patch
arekm
arekm at pld-linux.org
Wed Mar 16 15:08:02 CET 2011
Author: arekm Date: Wed Mar 16 14:08:02 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- update union patch
---- Files affected:
packages/kernel:
kernel-unionfs.patch (1.11 -> 1.12) , kernel.spec (1.891 -> 1.892)
---- Diffs:
================================================================
Index: packages/kernel/kernel-unionfs.patch
diff -u packages/kernel/kernel-unionfs.patch:1.11 packages/kernel/kernel-unionfs.patch:1.12
--- packages/kernel/kernel-unionfs.patch:1.11 Sun Nov 7 11:19:06 2010
+++ packages/kernel/kernel-unionfs.patch Wed Mar 16 15:07:57 2011
@@ -1,8 +1,8 @@
diff --git a/Documentation/filesystems/00-INDEX b/Documentation/filesystems/00-INDEX
-index 4303614..5ade4a8 100644
+index 8c624a1..4aa288b 100644
--- a/Documentation/filesystems/00-INDEX
+++ b/Documentation/filesystems/00-INDEX
-@@ -112,6 +112,8 @@ udf.txt
+@@ -110,6 +110,8 @@ udf.txt
- info and mount options for the UDF filesystem.
ufs.txt
- info on the ufs filesystem.
@@ -532,10 +532,10 @@
+
+For more information, see <http://unionfs.filesystems.org/>.
diff --git a/MAINTAINERS b/MAINTAINERS
-index f2a2b8e..11d7f45 100644
+index 560ecce..09e38d6 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
-@@ -5917,6 +5917,14 @@ F: Documentation/cdrom/
+@@ -6276,6 +6276,14 @@ F: Documentation/cdrom/
F: drivers/cdrom/cdrom.c
F: include/linux/cdrom.h
@@ -551,10 +551,10 @@
M: Artem Bityutskiy <dedekind1 at gmail.com>
W: http://www.linux-mtd.infradead.org/
diff --git a/fs/Kconfig b/fs/Kconfig
-index 3d18530..65b6aa1 100644
+index 3db9caa..3dc2dfd 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
-@@ -169,6 +169,7 @@ if MISC_FILESYSTEMS
+@@ -170,6 +170,7 @@ if MISC_FILESYSTEMS
source "fs/adfs/Kconfig"
source "fs/affs/Kconfig"
source "fs/ecryptfs/Kconfig"
@@ -563,10 +563,10 @@
source "fs/hfsplus/Kconfig"
source "fs/befs/Kconfig"
diff --git a/fs/Makefile b/fs/Makefile
-index e6ec1d3..787332e 100644
+index a7f7cef..672664b 100644
--- a/fs/Makefile
+++ b/fs/Makefile
-@@ -84,6 +84,7 @@ obj-$(CONFIG_ISO9660_FS) += isofs/
+@@ -81,6 +81,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,22 +575,22 @@
obj-$(CONFIG_NFS_FS) += nfs/
obj-$(CONFIG_EXPORTFS) += exportfs/
diff --git a/fs/namei.c b/fs/namei.c
-index 24896e8..db22420 100644
+index 0087cf9..d3118a7 100644
--- a/fs/namei.c
+++ b/fs/namei.c
-@@ -385,6 +385,7 @@ void release_open_intent(struct nameidata *nd)
- else
- fput(nd->intent.open.file);
+@@ -562,6 +562,7 @@ void release_open_intent(struct nameidata *nd)
+ fput(file);
+ }
}
+EXPORT_SYMBOL_GPL(release_open_intent);
- static inline struct dentry *
- do_revalidate(struct dentry *dentry, struct nameidata *nd)
+ static inline int d_revalidate(struct dentry *dentry, struct nameidata *nd)
+ {
diff --git a/fs/splice.c b/fs/splice.c
-index 8f1dfae..7a57fab 100644
+index 50a5d97..a3af841 100644
--- a/fs/splice.c
+++ b/fs/splice.c
-@@ -1092,8 +1092,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
+@@ -1081,8 +1081,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
/*
* Attempt to initiate a splice from pipe to file.
*/
@@ -601,7 +601,7 @@
{
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
loff_t *, size_t, unsigned int);
-@@ -1116,13 +1116,14 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+@@ -1105,13 +1105,14 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
return splice_write(pipe, out, ppos, len, flags);
}
@@ -619,7 +619,7 @@
{
ssize_t (*splice_read)(struct file *, loff_t *,
struct pipe_inode_info *, size_t, unsigned int);
-@@ -1142,6 +1143,7 @@ static long do_splice_to(struct file *in, loff_t *ppos,
+@@ -1131,6 +1132,7 @@ static long do_splice_to(struct file *in, loff_t *ppos,
return splice_read(in, ppos, pipe, len, flags);
}
@@ -627,7 +627,7 @@
/**
* splice_direct_to_actor - splices data directly between two non-pipes
-@@ -1211,7 +1213,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
+@@ -1200,7 +1202,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
size_t read_len;
loff_t pos = sd->pos, prev_pos = pos;
@@ -636,7 +636,7 @@
if (unlikely(ret <= 0))
goto out_release;
-@@ -1270,8 +1272,8 @@ static int direct_splice_actor(struct pipe_inode_info *pipe,
+@@ -1259,8 +1261,8 @@ static int direct_splice_actor(struct pipe_inode_info *pipe,
{
struct file *file = sd->u.file;
@@ -647,7 +647,7 @@
}
/**
-@@ -1368,7 +1370,7 @@ static long do_splice(struct file *in, loff_t __user *off_in,
+@@ -1345,7 +1347,7 @@ static long do_splice(struct file *in, loff_t __user *off_in,
} else
off = &out->f_pos;
@@ -656,7 +656,7 @@
if (off_out && copy_to_user(off_out, off, sizeof(loff_t)))
ret = -EFAULT;
-@@ -1388,7 +1390,7 @@ static long do_splice(struct file *in, loff_t __user *off_in,
+@@ -1365,7 +1367,7 @@ static long do_splice(struct file *in, loff_t __user *off_in,
} else
off = &in->f_pos;
@@ -723,11 +723,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..86c32ba
+index 0000000..10a321a
--- /dev/null
+++ b/fs/unionfs/Makefile
@@ -0,0 +1,17 @@
-+UNIONFS_VERSION="2.5.7 (for 2.6.36)"
++UNIONFS_VERSION="2.5.8 (for 2.6.38-rc7)"
+
+EXTRA_CFLAGS += -DUNIONFS_VERSION=\"$(UNIONFS_VERSION)\"
+
@@ -1492,9 +1492,9 @@
+ 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->compat_ioctl) {
++ } 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);
+#endif
+ }
@@ -2550,10 +2550,10 @@
+}
diff --git a/fs/unionfs/debug.c b/fs/unionfs/debug.c
new file mode 100644
-index 0000000..100d2c6
+index 0000000..a76f92a
--- /dev/null
+++ b/fs/unionfs/debug.c
-@@ -0,0 +1,532 @@
+@@ -0,0 +1,548 @@
+/*
+ * Copyright (c) 2003-2010 Erez Zadok
+ * Copyright (c) 2005-2007 Josef 'Jeff' Sipek
@@ -2998,6 +2998,22 @@
+ }
+}
+
++static unsigned int __mnt_get_count(struct vfsmount *mnt)
++{
++#ifdef CONFIG_SMP
++ unsigned int count = 0;
++ int cpu;
++
++ for_each_possible_cpu(cpu) {
++ count += per_cpu_ptr(mnt->mnt_pcp, cpu)->mnt_count;
++ }
++
++ return count;
++#else
++ return mnt->mnt_count;
++#endif
++}
++
+/* useful to track vfsmount leaks that could cause EBUSY on unmount */
+void __show_branch_counts(const struct super_block *sb,
+ const char *file, const char *fxn, int line)
@@ -3012,7 +3028,7 @@
+ else
+ mnt = NULL;
+ printk(KERN_CONT "%d:",
-+ (mnt ? atomic_read(&mnt->mnt_count) : -99));
++ (mnt ? __mnt_get_count(mnt) : -99));
+ }
+ printk(KERN_CONT "%s:%s:%d\n", file, fxn, line);
+}
@@ -4764,10 +4780,10 @@
+};
diff --git a/fs/unionfs/inode.c b/fs/unionfs/inode.c
new file mode 100644
-index 0000000..4c36f16
+index 0000000..0066238
--- /dev/null
+++ b/fs/unionfs/inode.c
-@@ -0,0 +1,1061 @@
+@@ -0,0 +1,1077 @@
+/*
+ * Copyright (c) 2003-2010 Erez Zadok
+ * Copyright (c) 2003-2006 Charles P. Wright
@@ -5513,7 +5529,7 @@
+ * This is a variant of fs/namei.c:permission() or inode_permission() which
+ * skips over EROFS tests (because we perform copyup on EROFS).
+ */
-+static int __inode_permission(struct inode *inode, int mask)
++static int __inode_permission(struct inode *inode, int mask, unsigned int flags)
+{
+ int retval;
+
@@ -5523,7 +5539,7 @@
+
+ /* Ordinary permission routines do not understand MAY_APPEND. */
+ if (inode->i_op && inode->i_op->permission) {
-+ retval = inode->i_op->permission(inode, mask);
++ retval = inode->i_op->permission(inode, mask, flags);
+ if (!retval) {
+ /*
+ * Exec permission on a regular file is denied if none
@@ -5537,7 +5553,7 @@
+ return -EACCES;
+ }
+ } else {
-+ retval = generic_permission(inode, mask, NULL);
++ retval = generic_permission(inode, mask, flags, NULL);
+ }
+ if (retval)
+ return retval;
@@ -5554,7 +5570,7 @@
+ * unionfs_permission, or anything it calls, will use stale branch
+ * information.
+ */
-+static int unionfs_permission(struct inode *inode, int mask)
++static int unionfs_permission(struct inode *inode, int mask, unsigned int flags)
+{
+ struct inode *lower_inode = NULL;
+ int err = 0;
@@ -5564,6 +5580,9 @@
+ struct inode *inode_grabbed = igrab(inode);
+ struct dentry *dentry = d_find_alias(inode);
+
++ if (flags & IPERM_FLAG_RCU)
++ return -ECHILD;
++
+ if (dentry)
+ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD);
+
@@ -5607,7 +5626,7 @@
+ * copyup taking place later on. However, if user never had
+ * access to the file, then no copyup could ever take place.
+ */
-+ err = __inode_permission(lower_inode, mask);
++ err = __inode_permission(lower_inode, mask, flags);
+ if (err && err != -EACCES && err != EPERM && bindex > 0) {
+ umode_t mode = lower_inode->i_mode;
+ if ((is_robranch_super(inode->i_sb, bindex) ||
@@ -5630,7 +5649,7 @@
+ if (err && err == -EACCES &&
+ is_robranch_super(inode->i_sb, bindex) &&
+ lower_inode->i_sb->s_magic == NFS_SUPER_MAGIC)
-+ err = generic_permission(lower_inode, mask, NULL);
++ err = generic_permission(lower_inode, mask, flags, NULL);
+
+ /*
+ * The permissions are an intersection of the overall directory
@@ -5671,6 +5690,12 @@
+ struct inode *lower_inode;
+ int bstart, bend, bindex;
+ loff_t size;
++ struct iattr lower_ia;
++
++ /* check if user has permission to change inode */
++ err = inode_change_ok(dentry->d_inode, ia);
++ if (err)
++ goto out_err;
+
+ unionfs_read_lock(dentry->d_sb, UNIONFS_SMUTEX_CHILD);
+ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT);
@@ -5758,8 +5783,15 @@
+ * unlinked (no inode->i_sb and i_ino==0. This happens if someone
+ * tries to open(), unlink(), then ftruncate() a file.
+ */
++ /* prepare our own lower struct iattr (with our own lower file) */
++ memcpy(&lower_ia, ia, sizeof(lower_ia));
++ if (ia->ia_valid & ATTR_FILE) {
++ lower_ia.ia_file = unionfs_lower_file(ia->ia_file);
++ BUG_ON(!lower_ia.ia_file); // XXX?
++ }
++
+ mutex_lock(&lower_dentry->d_inode->i_mutex);
-+ err = notify_change(lower_dentry, ia);
++ err = notify_change(lower_dentry, &lower_ia);
+ mutex_unlock(&lower_dentry->d_inode->i_mutex);
+ if (err)
+ goto out;
@@ -5787,7 +5819,7 @@
+ unionfs_unlock_dentry(dentry);
+ unionfs_unlock_parent(dentry, parent);
+ unionfs_read_unlock(dentry->d_sb);
-+
++out_err:
+ return err;
+}
+
@@ -6406,10 +6438,10 @@
+}
diff --git a/fs/unionfs/main.c b/fs/unionfs/main.c
new file mode 100644
-index 0000000..258386e
+index 0000000..9ee58eb
--- /dev/null
+++ b/fs/unionfs/main.c
-@@ -0,0 +1,758 @@
+@@ -0,0 +1,762 @@
+/*
+ * Copyright (c) 2003-2010 Erez Zadok
+ * Copyright (c) 2003-2006 Charles P. Wright
@@ -6699,7 +6731,7 @@
+ if (options[0] == '\0') {
+ printk(KERN_ERR "unionfs: no branches specified\n");
+ err = -EINVAL;
-+ goto out;
++ goto out_return;
+ }
+
+ /*
@@ -6715,14 +6747,17 @@
+ kcalloc(branches, sizeof(struct unionfs_data), GFP_KERNEL);
+ if (unlikely(!UNIONFS_SB(sb)->data)) {
+ err = -ENOMEM;
-+ goto out;
++ goto out_return;
+ }
+
+ lower_root_info->lower_paths =
+ kcalloc(branches, sizeof(struct path), GFP_KERNEL);
+ if (unlikely(!lower_root_info->lower_paths)) {
+ err = -ENOMEM;
-+ goto out;
++ /* free the underlying pointer array */
++ kfree(UNIONFS_SB(sb)->data);
++ UNIONFS_SB(sb)->data = NULL;
++ goto out_return;
+ }
+
+ /* now parsing a string such as "b1:b2=rw:b3=ro:b4" */
@@ -6839,6 +6874,7 @@
+ lower_root_info->lower_paths = NULL;
+ UNIONFS_SB(sb)->data = NULL;
+ }
++out_return:
+ return err;
+}
+
@@ -7265,7 +7301,7 @@
+};
diff --git a/fs/unionfs/rdstate.c b/fs/unionfs/rdstate.c
new file mode 100644
-index 0000000..f745fbc
+index 0000000..d57f1f8
--- /dev/null
+++ b/fs/unionfs/rdstate.c
@@ -0,0 +1,285 @@
@@ -7433,7 +7469,7 @@
+
+static void free_filldir_node(struct filldir_node *node)
+{
-+ if (node->namelen >= DNAME_INLINE_LEN_MIN)
++ if (node->namelen >= DNAME_INLINE_LEN)
+ kfree(node->name);
+ kmem_cache_free(unionfs_filldir_cachep, node);
+}
@@ -7534,7 +7570,7 @@
+ new->bindex = bindex;
+ new->whiteout = whiteout;
+
-+ if (namelen < DNAME_INLINE_LEN_MIN) {
++ if (namelen < DNAME_INLINE_LEN) {
+ new->name = new->iname;
+ } else {
+ new->name = kmalloc(namelen + 1, GFP_KERNEL);
@@ -9419,7 +9455,7 @@
+};
diff --git a/fs/unionfs/union.h b/fs/unionfs/union.h
new file mode 100644
-index 0000000..d49c834
+index 0000000..6c7b9aa
--- /dev/null
+++ b/fs/unionfs/union.h
@@ -0,0 +1,669 @@
@@ -9615,7 +9651,7 @@
+ int whiteout;
+
+ /* Inline name, so we don't need to separately kmalloc small ones */
-+ char iname[DNAME_INLINE_LEN_MIN];
++ char iname[DNAME_INLINE_LEN];
+};
+
+/* Directory hash table. */
@@ -11171,10 +11207,10 @@
*/
diff --git a/include/linux/magic.h b/include/linux/magic.h
-index eb9800f..9770154 100644
+index 62730ea..bd9832b 100644
--- a/include/linux/magic.h
+++ b/include/linux/magic.h
-@@ -47,6 +47,8 @@
+@@ -48,6 +48,8 @@
#define REISER2FS_SUPER_MAGIC_STRING "ReIsEr2Fs"
#define REISER2FS_JR_SUPER_MAGIC_STRING "ReIsEr3Fs"
@@ -11184,10 +11220,10 @@
#define USBDEVICE_SUPER_MAGIC 0x9fa2
#define CGROUP_SUPER_MAGIC 0x27e0eb
diff --git a/include/linux/namei.h b/include/linux/namei.h
-index 05b441d..dca6f9a 100644
+index f276d4f..cf4ec6c 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
-@@ -72,6 +72,7 @@ extern int vfs_path_lookup(struct dentry *, struct vfsmount *,
+@@ -78,6 +78,7 @@ extern int vfs_path_lookup(struct dentry *, struct vfsmount *,
extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry,
int (*open)(struct inode *, struct file *));
@@ -11240,14 +11276,14 @@
+#endif /* _LINUX_UNIONFS_H */
+
diff --git a/security/security.c b/security/security.c
-index c53949f..eb71394 100644
+index 7b7308a..abdb5a5 100644
--- a/security/security.c
+++ b/security/security.c
-@@ -528,6 +528,7 @@ int security_inode_permission(struct inode *inode, int mask)
+@@ -511,6 +511,7 @@ int security_inode_permission(struct inode *inode, int mask)
return 0;
return security_ops->inode_permission(inode, mask);
}
+EXPORT_SYMBOL(security_inode_permission);
- int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
+ int security_inode_exec_permission(struct inode *inode, unsigned int flags)
{
================================================================
Index: packages/kernel/kernel.spec
diff -u packages/kernel/kernel.spec:1.891 packages/kernel/kernel.spec:1.892
--- packages/kernel/kernel.spec:1.891 Tue Mar 15 09:42:23 2011
+++ packages/kernel/kernel.spec Wed Mar 16 15:07:57 2011
@@ -237,7 +237,7 @@
# Fix verified for that kernel version.
Patch130: kernel-forcedeth-WON.patch
-# http://download.filesystems.org/unionfs/unionfs-2.x/unionfs-2.5.7_for_2.6.36.diff.gz
+# http://download.filesystems.org/unionfs/unionfs-2.x/unionfs-2.5.8_for_2.6.38-rc7.diff.gz
Patch140: kernel-unionfs.patch
# http://git.c3sl.ufpr.br/pub/scm/aufs/aufs2-standalone.git, read README
@@ -1524,6 +1524,9 @@
All persons listed below can be reached at <cvs_login>@pld-linux.org
$Log$
+Revision 1.892 2011/03/16 14:07:57 arekm
+- update union patch
+
Revision 1.891 2011/03/15 08:42:23 arekm
- update vserver to patch-2.6.38-rc8-vs2.3.0.37-rc6.diff; drop TIOCGDEV.patch (merged); update config for .38
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel-unionfs.patch?r1=1.11&r2=1.12&f=u
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel/kernel.spec?r1=1.891&r2=1.892&f=u
More information about the pld-cvs-commit
mailing list