packages (Titanium): kernel-desktop/kernel-desktop-unionfs.patch - updated ...
shadzik
shadzik at pld-linux.org
Thu Jun 25 10:06:32 CEST 2009
Author: shadzik Date: Thu Jun 25 08:06:32 2009 GMT
Module: packages Tag: Titanium
---- Log message:
- updated for 2.6.30
---- Files affected:
packages/kernel-desktop:
kernel-desktop-unionfs.patch (1.2.2.2 -> 1.2.2.3)
---- Diffs:
================================================================
Index: packages/kernel-desktop/kernel-desktop-unionfs.patch
diff -u packages/kernel-desktop/kernel-desktop-unionfs.patch:1.2.2.2 packages/kernel-desktop/kernel-desktop-unionfs.patch:1.2.2.3
--- packages/kernel-desktop/kernel-desktop-unionfs.patch:1.2.2.2 Tue Mar 24 16:35:11 2009
+++ packages/kernel-desktop/kernel-desktop-unionfs.patch Thu Jun 25 10:06:27 2009
@@ -1,8 +1,8 @@
diff --git a/Documentation/filesystems/00-INDEX b/Documentation/filesystems/00-INDEX
-index 52cd611..bc6b437 100644
+index 8dd6db7..f2f5a6a 100644
--- a/Documentation/filesystems/00-INDEX
+++ b/Documentation/filesystems/00-INDEX
-@@ -106,6 +106,8 @@ udf.txt
+@@ -108,6 +108,8 @@ udf.txt
- info and mount options for the UDF filesystem.
ufs.txt
- info on the ufs filesystem.
@@ -532,12 +532,12 @@
+
+For more information, see <http://unionfs.filesystems.org/>.
diff --git a/MAINTAINERS b/MAINTAINERS
-index 3fe4dc2..168cc4d 100644
+index cf4abdd..4841326 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
-@@ -4370,6 +4370,14 @@ L: linux-kernel at vger.kernel.org
- W: http://www.kernel.dk
- S: Maintained
+@@ -5723,6 +5723,14 @@ F: Documentation/cdrom/
+ F: drivers/cdrom/cdrom.c
+ F: include/linux/cdrom.h
+UNIONFS
+P: Erez Zadok
@@ -551,63 +551,22 @@
P: Artem Bityutskiy
M: dedekind at infradead.org
diff --git a/fs/Kconfig b/fs/Kconfig
-index 51307b0..f1a2dbd 100644
+index 9f7270f..46ef91e 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
-@@ -740,6 +740,48 @@ config CONFIGFS_FS
-
- endmenu
-
-+
-+menu "Layered filesystems"
-+
-+config ECRYPT_FS
-+ tristate "eCrypt filesystem layer support (EXPERIMENTAL)"
-+ depends on EXPERIMENTAL && KEYS && CRYPTO && NET
-+ help
-+ Encrypted filesystem that operates on the VFS layer. See
-+ <file:Documentation/filesystems/ecryptfs.txt> to learn more about
-+ eCryptfs. Userspace components are required and can be
-+ obtained from <http://ecryptfs.sf.net>.
-+
-+ To compile this file system support as a module, choose M here: the
-+ module will be called ecryptfs.
-+
-+config UNION_FS
-+ tristate "Union file system (EXPERIMENTAL)"
-+ depends on EXPERIMENTAL
-+ help
-+ Unionfs is a stackable unification file system, which appears to
-+ merge the contents of several directories (branches), while keeping
-+ their physical content separate.
-+
-+ See <http://unionfs.filesystems.org/> for details.
-+
-+config UNION_FS_XATTR
-+ bool "Unionfs extended attributes"
-+ depends on UNION_FS
-+ help
-+ Extended attributes are name:value pairs associated with inodes by
-+ the kernel or by users (see the attr(5) manual page).
-+
-+ If unsure, say N.
-+
-+config UNION_FS_DEBUG
-+ bool "Debug Unionfs"
-+ depends on UNION_FS
-+ help
-+ If you say Y here, you can turn on debugging output from Unionfs.
-+
-+endmenu
-+
- menuconfig MISC_FILESYSTEMS
- bool "Miscellaneous filesystems"
- default y
+@@ -157,6 +157,7 @@ if MISC_FILESYSTEMS
+ source "fs/adfs/Kconfig"
+ source "fs/affs/Kconfig"
+ source "fs/ecryptfs/Kconfig"
++source "fs/unionfs/Kconfig"
+ source "fs/hfs/Kconfig"
+ source "fs/hfsplus/Kconfig"
+ source "fs/befs/Kconfig"
diff --git a/fs/Makefile b/fs/Makefile
-index 38bc735..a1b3bda 100644
+index af6d047..6c254d5 100644
--- a/fs/Makefile
+++ b/fs/Makefile
-@@ -85,6 +85,7 @@ obj-$(CONFIG_ISO9660_FS) += isofs/
+@@ -84,6 +84,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/
@@ -616,7 +575,7 @@
obj-$(CONFIG_NFS_FS) += nfs/
obj-$(CONFIG_EXPORTFS) += exportfs/
diff --git a/fs/ecryptfs/dentry.c b/fs/ecryptfs/dentry.c
-index 5e59658..4621f89 100644
+index 2dda5ad..8f006a0 100644
--- a/fs/ecryptfs/dentry.c
+++ b/fs/ecryptfs/dentry.c
@@ -62,7 +62,7 @@ static int ecryptfs_d_revalidate(struct dentry *dentry, struct nameidata *nd)
@@ -629,10 +588,10 @@
out:
return rc;
diff --git a/fs/ecryptfs/inode.c b/fs/ecryptfs/inode.c
-index 5697899..8a370a1 100644
+index 2f0945d..e884c3b 100644
--- a/fs/ecryptfs/inode.c
+++ b/fs/ecryptfs/inode.c
-@@ -628,9 +628,9 @@ ecryptfs_rename(struct inode *old_dir, struct dentry *old_dentry,
+@@ -624,9 +624,9 @@ ecryptfs_rename(struct inode *old_dir, struct dentry *old_dentry,
lower_new_dir_dentry->d_inode, lower_new_dentry);
if (rc)
goto out_lock;
@@ -644,7 +603,7 @@
out_lock:
unlock_rename(lower_old_dir_dentry, lower_new_dir_dentry);
dput(lower_new_dentry->d_parent);
-@@ -952,7 +952,7 @@ static int ecryptfs_setattr(struct dentry *dentry, struct iattr *ia)
+@@ -965,7 +965,7 @@ static int ecryptfs_setattr(struct dentry *dentry, struct iattr *ia)
rc = notify_change(lower_dentry, ia);
mutex_unlock(&lower_dentry->d_inode->i_mutex);
out:
@@ -654,23 +613,23 @@
}
diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c
-index 789cf2e..7f82ed3 100644
+index 9f0aa98..3d94155 100644
--- a/fs/ecryptfs/main.c
+++ b/fs/ecryptfs/main.c
-@@ -194,7 +194,7 @@ int ecryptfs_interpose(struct dentry *lower_dentry, struct dentry *dentry,
- d_add(dentry, inode);
- else
- d_instantiate(dentry, inode);
+@@ -190,7 +190,7 @@ int ecryptfs_interpose(struct dentry *lower_dentry, struct dentry *dentry,
+ init_special_inode(inode, lower_inode->i_mode,
+ lower_inode->i_rdev);
+ dentry->d_op = &ecryptfs_dops;
- fsstack_copy_attr_all(inode, lower_inode, NULL);
+ fsstack_copy_attr_all(inode, lower_inode);
/* This size will be overwritten for real files w/ headers and
* other metadata */
fsstack_copy_inode_size(inode, lower_inode);
diff --git a/fs/namei.c b/fs/namei.c
-index bbc15c2..7983d41 100644
+index 967c3db..fd48bb0 100644
--- a/fs/namei.c
+++ b/fs/namei.c
-@@ -373,6 +373,7 @@ void release_open_intent(struct nameidata *nd)
+@@ -375,6 +375,7 @@ void release_open_intent(struct nameidata *nd)
else
fput(nd->intent.open.file);
}
@@ -679,10 +638,10 @@
static inline struct dentry *
do_revalidate(struct dentry *dentry, struct nameidata *nd)
diff --git a/fs/splice.c b/fs/splice.c
-index 4ed0ba4..6637e35 100644
+index 666953d..26bf825 100644
--- a/fs/splice.c
+++ b/fs/splice.c
-@@ -888,8 +888,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
+@@ -905,8 +905,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
/*
* Attempt to initiate a splice from pipe to file.
*/
@@ -693,7 +652,7 @@
{
int ret;
-@@ -908,13 +908,14 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+@@ -925,13 +925,14 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
return out->f_op->splice_write(pipe, out, ppos, len, flags);
}
@@ -711,7 +670,7 @@
{
int ret;
-@@ -930,6 +931,7 @@ static long do_splice_to(struct file *in, loff_t *ppos,
+@@ -947,6 +948,7 @@ static long do_splice_to(struct file *in, loff_t *ppos,
return in->f_op->splice_read(in, ppos, pipe, len, flags);
}
@@ -719,7 +678,7 @@
/**
* splice_direct_to_actor - splices data directly between two non-pipes
-@@ -999,7 +1001,7 @@ ssize_t splice_direct_to_actor(struct file *in, struct splice_desc *sd,
+@@ -1016,7 +1018,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;
@@ -728,7 +687,7 @@
if (unlikely(ret <= 0))
goto out_release;
-@@ -1058,7 +1060,7 @@ static int direct_splice_actor(struct pipe_inode_info *pipe,
+@@ -1075,7 +1077,7 @@ static int direct_splice_actor(struct pipe_inode_info *pipe,
{
struct file *file = sd->u.file;
@@ -737,7 +696,7 @@
}
/**
-@@ -1132,7 +1134,7 @@ static long do_splice(struct file *in, loff_t __user *off_in,
+@@ -1149,7 +1151,7 @@ static long do_splice(struct file *in, loff_t __user *off_in,
} else
off = &out->f_pos;
@@ -746,7 +705,7 @@
if (off_out && copy_to_user(off_out, off, sizeof(loff_t)))
ret = -EFAULT;
-@@ -1153,7 +1155,7 @@ static long do_splice(struct file *in, loff_t __user *off_in,
+@@ -1170,7 +1172,7 @@ static long do_splice(struct file *in, loff_t __user *off_in,
} else
off = &in->f_pos;
@@ -865,13 +824,43 @@
+ dest->i_nlink = src->i_nlink;
}
EXPORT_SYMBOL_GPL(fsstack_copy_attr_all);
+diff --git a/fs/unionfs/Kconfig b/fs/unionfs/Kconfig
+new file mode 100644
+index 0000000..f3c1ac4
+--- /dev/null
++++ b/fs/unionfs/Kconfig
+@@ -0,0 +1,24 @@
++config UNION_FS
++ tristate "Union file system (EXPERIMENTAL)"
++ depends on EXPERIMENTAL
++ help
++ Unionfs is a stackable unification file system, which appears to
++ merge the contents of several directories (branches), while keeping
++ their physical content separate.
++
++ See <http://unionfs.filesystems.org> for details
++
++config UNION_FS_XATTR
++ bool "Unionfs extended attributes"
++ depends on UNION_FS
++ help
++ Extended attributes are name:value pairs associated with inodes by
++ the kernel or by users (see the attr(5) manual page).
++
++ If unsure, say N.
++
++config UNION_FS_DEBUG
++ bool "Debug Unionfs"
++ depends on UNION_FS
++ help
++ 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..27a4781
+index 0000000..56c6790
--- /dev/null
+++ b/fs/unionfs/Makefile
@@ -0,0 +1,17 @@
-+UNIONFS_VERSION="2.5.1 (for 2.6.29-rc2)"
++UNIONFS_VERSION="2.5.2 (for 2.6.30)"
+
+EXTRA_CFLAGS += -DUNIONFS_VERSION=\"$(UNIONFS_VERSION)\"
+
@@ -890,10 +879,10 @@
+endif
diff --git a/fs/unionfs/commonfops.c b/fs/unionfs/commonfops.c
new file mode 100644
-index 0000000..e9dc23c
+index 0000000..587f984
--- /dev/null
+++ b/fs/unionfs/commonfops.c
-@@ -0,0 +1,880 @@
+@@ -0,0 +1,896 @@
+/*
+ * Copyright (c) 2003-2009 Erez Zadok
+ * Copyright (c) 2003-2006 Charles P. Wright
@@ -958,7 +947,7 @@
+ pr_debug("unionfs: trying to rename %s to %s\n",
+ dentry->d_name.name, name);
+
-+ tmp_dentry = lookup_one_len(name, lower_dentry->d_parent,
++ tmp_dentry = lookup_lck_len(name, lower_dentry->d_parent,
+ nlen);
+ if (IS_ERR(tmp_dentry)) {
+ err = PTR_ERR(tmp_dentry);
@@ -1546,6 +1535,21 @@
+ int bindex, bstart, bend;
+ int fgen, err = 0;
+
++ /*
++ * Since mm/memory.c:might_fault() (under PROVE_LOCKING) was
++ * modified in 2.6.29-rc1 to call might_lock_read on mmap_sem, this
++ * has been causing false positives in file system stacking layers.
++ * In particular, our ->mmap is called after sys_mmap2 already holds
++ * mmap_sem, then we lock our own mutexes; but earlier, it's
++ * possible for lockdep to have locked our mutexes first, and then
++ * we call a lower ->readdir which could call might_fault. The
++ * different ordering of the locks is what lockdep complains about
++ * -- unnecessarily. Therefore, we have no choice but to tell
++ * lockdep to temporarily turn off lockdep here. Note: the comments
++ * inside might_sleep also suggest that it would have been
++ * nicer to only annotate paths that needs that might_lock_read.
++ */
++ lockdep_off();
+ unionfs_read_lock(sb, UNIONFS_SMUTEX_PARENT);
+ parent = unionfs_lock_parent(dentry, UNIONFS_DMUTEX_PARENT);
+ unionfs_lock_dentry(dentry, UNIONFS_DMUTEX_CHILD);
@@ -1603,6 +1607,7 @@
+ unionfs_unlock_dentry(dentry);
+ unionfs_unlock_parent(dentry, parent);
+ unionfs_read_unlock(sb);
++ lockdep_on();
+ return err;
+}
+
@@ -1776,7 +1781,7 @@
+}
diff --git a/fs/unionfs/copyup.c b/fs/unionfs/copyup.c
new file mode 100644
-index 0000000..3d0c0ca
+index 0000000..c43cc7f
--- /dev/null
+++ b/fs/unionfs/copyup.c
@@ -0,0 +1,897 @@
@@ -2560,7 +2565,7 @@
+
+ if (child_dentry != dentry) {
+ /* lookup child in the underlying file system */
-+ lower_dentry = lookup_one_len(childname, lower_parent_dentry,
++ lower_dentry = lookup_lck_len(childname, lower_parent_dentry,
+ childnamelen);
+ if (IS_ERR(lower_dentry))
+ goto out;
@@ -2569,7 +2574,7 @@
+ * Is the name a whiteout of the child name ? lookup the
+ * whiteout child in the underlying file system
+ */
-+ lower_dentry = lookup_one_len(name, lower_parent_dentry,
++ lower_dentry = lookup_lck_len(name, lower_parent_dentry,
+ strlen(name));
+ if (IS_ERR(lower_dentry))
+ goto out;
@@ -5933,7 +5938,7 @@
+};
diff --git a/fs/unionfs/lookup.c b/fs/unionfs/lookup.c
new file mode 100644
-index 0000000..9d887ac
+index 0000000..6361541
--- /dev/null
+++ b/fs/unionfs/lookup.c
@@ -0,0 +1,569 @@
@@ -5989,7 +5994,7 @@
+ * it's safe to call lookup_one_len (which doesn't take a
+ * vfsmount).
+ */
-+ dentry = lookup_one_len(name, base, strlen(name));
++ dentry = lookup_lck_len(name, base, strlen(name));
+ if (new_mnt)
+ *new_mnt = mntget(lower_nd.path.mnt);
+ break;
@@ -6408,7 +6413,7 @@
+ if (!S_ISDIR(lower_dir_dentry->d_inode->i_mode))
+ goto out; /* XXX: should be BUG_ON */
+ /* XXX: do we need to cross bind mounts here? */
-+ lower_dentry = lookup_one_len(name, lower_dir_dentry, namelen);
++ lower_dentry = lookup_lck_len(name, lower_dir_dentry, namelen);
+ if (IS_ERR(lower_dentry)) {
+ err = PTR_ERR(lower_dentry);
+ goto out;
@@ -9542,10 +9547,10 @@
+};
diff --git a/fs/unionfs/union.h b/fs/unionfs/union.h
new file mode 100644
-index 0000000..1b2b86f
+index 0000000..1a05f63
--- /dev/null
+++ b/fs/unionfs/union.h
-@@ -0,0 +1,650 @@
+@@ -0,0 +1,661 @@
+/*
+ * Copyright (c) 2003-2009 Erez Zadok
+ * Copyright (c) 2003-2006 Charles P. Wright
@@ -10101,6 +10106,17 @@
+ dput(dir);
+}
+
++/* lock base inode mutex before calling lookup_one_len */
++static inline struct dentry *lookup_lck_len(const char *name,
++ struct dentry *base, int len)
++{
++ struct dentry *d;
++ mutex_lock(&base->d_inode->i_mutex);
++ d = lookup_one_len(name, base, len);
++ mutex_unlock(&base->d_inode->i_mutex);
++ return d;
++}
++
+static inline struct vfsmount *unionfs_mntget(struct dentry *dentry,
+ int bindex)
+{
@@ -10486,7 +10502,7 @@
+}
diff --git a/fs/unionfs/whiteout.c b/fs/unionfs/whiteout.c
new file mode 100644
-index 0000000..a55684d
+index 0000000..626006a
--- /dev/null
+++ b/fs/unionfs/whiteout.c
@@ -0,0 +1,584 @@
@@ -10593,7 +10609,7 @@
+ }
+
+ /* check if whiteout exists in this branch: lookup .wh.foo */
-+ wh_dentry = lookup_one_len(whname, lower_parent, strlen(whname));
++ wh_dentry = lookup_lck_len(whname, lower_parent, strlen(whname));
+ if (IS_ERR(wh_dentry)) {
+ err = PTR_ERR(wh_dentry);
+ goto out;
@@ -10803,7 +10819,7 @@
+ }
+
+ lower_wh_dentry =
-+ lookup_one_len(name, lower_dentry->d_parent,
++ lookup_lck_len(name, lower_dentry->d_parent,
+ dentry->d_name.len + UNIONFS_WHLEN);
+ if (IS_ERR(lower_wh_dentry))
+ continue;
@@ -10826,7 +10842,7 @@
+ if (!err)
+ err = vfs_create(lower_dir_dentry->d_inode,
+ lower_wh_dentry,
-+ ~current->fs->umask & S_IRUGO,
++ current_umask() & S_IRUGO,
+ &nd);
+ unlock_dir(lower_dir_dentry);
+ dput(lower_wh_dentry);
@@ -10889,7 +10905,7 @@
+
+ strlcpy(p, cursor->name, PATH_MAX - UNIONFS_WHLEN);
+ lower_dentry =
-+ lookup_one_len(name, lower_dir_dentry,
++ lookup_lck_len(name, lower_dir_dentry,
+ cursor->namelen +
+ UNIONFS_WHLEN);
+ if (IS_ERR(lower_dentry)) {
@@ -11291,7 +11307,7 @@
/* inlines */
static inline void fsstack_copy_attr_atime(struct inode *dest,
diff --git a/include/linux/magic.h b/include/linux/magic.h
-index 0b4df7e..2170b8a 100644
+index 5b4e28b..cf3db47 100644
--- a/include/linux/magic.h
+++ b/include/linux/magic.h
@@ -42,6 +42,8 @@
@@ -11304,10 +11320,10 @@
#define USBDEVICE_SUPER_MAGIC 0x9fa2
#define CGROUP_SUPER_MAGIC 0x27e0eb
diff --git a/include/linux/splice.h b/include/linux/splice.h
-index 528dcb9..4b5727c 100644
+index 5f3faa9..dcf21eb 100644
--- a/include/linux/splice.h
+++ b/include/linux/splice.h
-@@ -70,5 +70,10 @@ extern ssize_t splice_to_pipe(struct pipe_inode_info *,
+@@ -82,5 +82,10 @@ extern ssize_t splice_to_pipe(struct pipe_inode_info *,
struct splice_pipe_desc *);
extern ssize_t splice_direct_to_actor(struct file *, struct splice_desc *,
splice_direct_actor *);
@@ -11347,10 +11363,10 @@
+#endif /* _LINUX_UNIONFS_H */
+
diff --git a/security/security.c b/security/security.c
-index c3586c0..17c2cdf 100644
+index 5284255..2205a77 100644
--- a/security/security.c
+++ b/security/security.c
-@@ -520,6 +520,7 @@ int security_inode_permission(struct inode *inode, int mask)
+@@ -522,6 +522,7 @@ int security_inode_permission(struct inode *inode, int mask)
return 0;
return security_ops->inode_permission(inode, mask);
}
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel-desktop/kernel-desktop-unionfs.patch?r1=1.2.2.2&r2=1.2.2.3&f=u
More information about the pld-cvs-commit
mailing list