aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/generic/patches-3.6/100-overlayfs.patch
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/generic/patches-3.6/100-overlayfs.patch')
-rw-r--r--target/linux/generic/patches-3.6/100-overlayfs.patch152
1 files changed, 65 insertions, 87 deletions
diff --git a/target/linux/generic/patches-3.6/100-overlayfs.patch b/target/linux/generic/patches-3.6/100-overlayfs.patch
index dcc1eaacff..5ffeb0ed77 100644
--- a/target/linux/generic/patches-3.6/100-overlayfs.patch
+++ b/target/linux/generic/patches-3.6/100-overlayfs.patch
@@ -1,7 +1,6 @@
-diff -Nur -x .git vfs-4cbe5a5/Documentation/filesystems/Locking vfs-3d5a648/Documentation/filesystems/Locking
---- vfs-4cbe5a5/Documentation/filesystems/Locking 2012-09-01 19:39:58.000000000 +0200
-+++ vfs-3d5a648/Documentation/filesystems/Locking 2012-09-05 16:35:20.000000000 +0200
-@@ -64,6 +64,7 @@
+--- a/Documentation/filesystems/Locking
++++ b/Documentation/filesystems/Locking
+@@ -64,6 +64,7 @@ prototypes:
int (*atomic_open)(struct inode *, struct dentry *,
struct file *, unsigned open_flag,
umode_t create_mode, int *opened);
@@ -9,7 +8,7 @@ diff -Nur -x .git vfs-4cbe5a5/Documentation/filesystems/Locking vfs-3d5a648/Docu
locking rules:
all may block
-@@ -92,6 +93,7 @@
+@@ -92,6 +93,7 @@ removexattr: yes
fiemap: no
update_time: no
atomic_open: yes
@@ -17,9 +16,8 @@ diff -Nur -x .git vfs-4cbe5a5/Documentation/filesystems/Locking vfs-3d5a648/Docu
Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on
victim.
-diff -Nur -x .git vfs-4cbe5a5/Documentation/filesystems/overlayfs.txt vfs-3d5a648/Documentation/filesystems/overlayfs.txt
---- vfs-4cbe5a5/Documentation/filesystems/overlayfs.txt 1970-01-01 01:00:00.000000000 +0100
-+++ vfs-3d5a648/Documentation/filesystems/overlayfs.txt 2012-09-05 16:35:20.000000000 +0200
+--- /dev/null
++++ b/Documentation/filesystems/overlayfs.txt
@@ -0,0 +1,199 @@
+Written by: Neil Brown <neilb@suse.de>
+
@@ -220,10 +218,9 @@ diff -Nur -x .git vfs-4cbe5a5/Documentation/filesystems/overlayfs.txt vfs-3d5a64
+filesystem are not allowed. If the underlying filesystem is changed,
+the behavior of the overlay is undefined, though it will not result in
+a crash or deadlock.
-diff -Nur -x .git vfs-4cbe5a5/Documentation/filesystems/vfs.txt vfs-3d5a648/Documentation/filesystems/vfs.txt
---- vfs-4cbe5a5/Documentation/filesystems/vfs.txt 2012-09-01 19:39:58.000000000 +0200
-+++ vfs-3d5a648/Documentation/filesystems/vfs.txt 2012-09-05 16:35:20.000000000 +0200
-@@ -363,6 +363,7 @@
+--- a/Documentation/filesystems/vfs.txt
++++ b/Documentation/filesystems/vfs.txt
+@@ -363,6 +363,7 @@ struct inode_operations {
int (*atomic_open)(struct inode *, struct dentry *,
struct file *, unsigned open_flag,
umode_t create_mode, int *opened);
@@ -231,7 +228,7 @@ diff -Nur -x .git vfs-4cbe5a5/Documentation/filesystems/vfs.txt vfs-3d5a648/Docu
};
Again, all methods are called without any locks being held, unless
-@@ -692,6 +693,12 @@
+@@ -692,6 +693,12 @@ struct address_space_operations {
but instead uses bmap to find out where the blocks in the file
are and uses those addresses directly.
@@ -244,10 +241,9 @@ diff -Nur -x .git vfs-4cbe5a5/Documentation/filesystems/vfs.txt vfs-3d5a648/Docu
invalidatepage: If a page has PagePrivate set, then invalidatepage
will be called when part or all of the page is to be removed
-diff -Nur -x .git vfs-4cbe5a5/fs/ecryptfs/main.c vfs-3d5a648/fs/ecryptfs/main.c
---- vfs-4cbe5a5/fs/ecryptfs/main.c 2012-09-01 19:39:58.000000000 +0200
-+++ vfs-3d5a648/fs/ecryptfs/main.c 2012-09-05 16:35:20.000000000 +0200
-@@ -565,6 +565,13 @@
+--- a/fs/ecryptfs/main.c
++++ b/fs/ecryptfs/main.c
+@@ -566,6 +566,13 @@ static struct dentry *ecryptfs_mount(str
s->s_maxbytes = path.dentry->d_sb->s_maxbytes;
s->s_blocksize = path.dentry->d_sb->s_blocksize;
s->s_magic = ECRYPTFS_SUPER_MAGIC;
@@ -261,10 +257,9 @@ diff -Nur -x .git vfs-4cbe5a5/fs/ecryptfs/main.c vfs-3d5a648/fs/ecryptfs/main.c
inode = ecryptfs_get_inode(path.dentry->d_inode, s);
rc = PTR_ERR(inode);
-diff -Nur -x .git vfs-4cbe5a5/fs/internal.h vfs-3d5a648/fs/internal.h
---- vfs-4cbe5a5/fs/internal.h 2012-09-01 19:39:58.000000000 +0200
-+++ vfs-3d5a648/fs/internal.h 2012-09-05 16:35:20.000000000 +0200
-@@ -42,11 +42,6 @@
+--- a/fs/internal.h
++++ b/fs/internal.h
+@@ -42,11 +42,6 @@ static inline int __sync_blockdev(struct
extern void __init chrdev_init(void);
/*
@@ -276,10 +271,9 @@ diff -Nur -x .git vfs-4cbe5a5/fs/internal.h vfs-3d5a648/fs/internal.h
* namespace.c
*/
extern int copy_mount_options(const void __user *, unsigned long *);
-diff -Nur -x .git vfs-4cbe5a5/fs/Kconfig vfs-3d5a648/fs/Kconfig
---- vfs-4cbe5a5/fs/Kconfig 2012-09-01 19:39:58.000000000 +0200
-+++ vfs-3d5a648/fs/Kconfig 2012-09-05 16:35:20.000000000 +0200
-@@ -67,6 +67,7 @@
+--- a/fs/Kconfig
++++ b/fs/Kconfig
+@@ -67,6 +67,7 @@ source "fs/quota/Kconfig"
source "fs/autofs4/Kconfig"
source "fs/fuse/Kconfig"
@@ -287,10 +281,9 @@ diff -Nur -x .git vfs-4cbe5a5/fs/Kconfig vfs-3d5a648/fs/Kconfig
config CUSE
tristate "Character device in Userspace support"
-diff -Nur -x .git vfs-4cbe5a5/fs/Makefile vfs-3d5a648/fs/Makefile
---- vfs-4cbe5a5/fs/Makefile 2012-09-01 19:39:58.000000000 +0200
-+++ vfs-3d5a648/fs/Makefile 2012-09-05 16:35:20.000000000 +0200
-@@ -106,6 +106,7 @@
+--- a/fs/Makefile
++++ b/fs/Makefile
+@@ -106,6 +106,7 @@ obj-$(CONFIG_QNX6FS_FS) += qnx6/
obj-$(CONFIG_AUTOFS4_FS) += autofs4/
obj-$(CONFIG_ADFS_FS) += adfs/
obj-$(CONFIG_FUSE_FS) += fuse/
@@ -298,10 +291,9 @@ diff -Nur -x .git vfs-4cbe5a5/fs/Makefile vfs-3d5a648/fs/Makefile
obj-$(CONFIG_UDF_FS) += udf/
obj-$(CONFIG_SUN_OPENPROMFS) += openpromfs/
obj-$(CONFIG_OMFS_FS) += omfs/
-diff -Nur -x .git vfs-4cbe5a5/fs/namei.c vfs-3d5a648/fs/namei.c
---- vfs-4cbe5a5/fs/namei.c 2012-09-01 19:39:58.000000000 +0200
-+++ vfs-3d5a648/fs/namei.c 2012-09-05 16:35:20.000000000 +0200
-@@ -348,6 +348,7 @@
+--- a/fs/namei.c
++++ b/fs/namei.c
+@@ -348,6 +348,7 @@ int __inode_permission(struct inode *ino
return security_inode_permission(inode, mask);
}
@@ -309,7 +301,7 @@ diff -Nur -x .git vfs-4cbe5a5/fs/namei.c vfs-3d5a648/fs/namei.c
/**
* sb_permission - Check superblock-level permissions
-@@ -2822,9 +2823,12 @@
+@@ -2822,9 +2823,12 @@ finish_open_created:
error = may_open(&nd->path, acc_mode, open_flag);
if (error)
goto out;
@@ -325,10 +317,9 @@ diff -Nur -x .git vfs-4cbe5a5/fs/namei.c vfs-3d5a648/fs/namei.c
if (error == -EOPENSTALE)
goto stale_open;
goto out;
-diff -Nur -x .git vfs-4cbe5a5/fs/namespace.c vfs-3d5a648/fs/namespace.c
---- vfs-4cbe5a5/fs/namespace.c 2012-09-01 19:39:58.000000000 +0200
-+++ vfs-3d5a648/fs/namespace.c 2012-09-05 16:35:20.000000000 +0200
-@@ -1387,6 +1387,24 @@
+--- a/fs/namespace.c
++++ b/fs/namespace.c
+@@ -1387,6 +1387,24 @@ void drop_collected_mounts(struct vfsmou
release_mounts(&umount_list);
}
@@ -353,10 +344,9 @@ diff -Nur -x .git vfs-4cbe5a5/fs/namespace.c vfs-3d5a648/fs/namespace.c
int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
struct vfsmount *root)
{
-diff -Nur -x .git vfs-4cbe5a5/fs/open.c vfs-3d5a648/fs/open.c
---- vfs-4cbe5a5/fs/open.c 2012-09-01 19:39:58.000000000 +0200
-+++ vfs-3d5a648/fs/open.c 2012-09-05 16:35:20.000000000 +0200
-@@ -787,8 +787,7 @@
+--- a/fs/open.c
++++ b/fs/open.c
+@@ -787,8 +787,7 @@ struct file *dentry_open(const struct pa
return ERR_PTR(error);
f->f_flags = flags;
@@ -366,7 +356,7 @@ diff -Nur -x .git vfs-4cbe5a5/fs/open.c vfs-3d5a648/fs/open.c
if (!error) {
error = open_check_o_direct(f);
if (error) {
-@@ -803,6 +802,26 @@
+@@ -803,6 +802,26 @@ struct file *dentry_open(const struct pa
}
EXPORT_SYMBOL(dentry_open);
@@ -393,9 +383,8 @@ diff -Nur -x .git vfs-4cbe5a5/fs/open.c vfs-3d5a648/fs/open.c
static void __put_unused_fd(struct files_struct *files, unsigned int fd)
{
struct fdtable *fdt = files_fdtable(files);
-diff -Nur -x .git vfs-4cbe5a5/fs/overlayfs/copy_up.c vfs-3d5a648/fs/overlayfs/copy_up.c
---- vfs-4cbe5a5/fs/overlayfs/copy_up.c 1970-01-01 01:00:00.000000000 +0100
-+++ vfs-3d5a648/fs/overlayfs/copy_up.c 2012-09-05 16:35:20.000000000 +0200
+--- /dev/null
++++ b/fs/overlayfs/copy_up.c
@@ -0,0 +1,385 @@
+/*
+ *
@@ -782,9 +771,8 @@ diff -Nur -x .git vfs-4cbe5a5/fs/overlayfs/copy_up.c vfs-3d5a648/fs/overlayfs/co
+ dput(parent);
+ return err;
+}
-diff -Nur -x .git vfs-4cbe5a5/fs/overlayfs/dir.c vfs-3d5a648/fs/overlayfs/dir.c
---- vfs-4cbe5a5/fs/overlayfs/dir.c 1970-01-01 01:00:00.000000000 +0100
-+++ vfs-3d5a648/fs/overlayfs/dir.c 2012-09-05 16:35:20.000000000 +0200
+--- /dev/null
++++ b/fs/overlayfs/dir.c
@@ -0,0 +1,604 @@
+/*
+ *
@@ -1390,9 +1378,8 @@ diff -Nur -x .git vfs-4cbe5a5/fs/overlayfs/dir.c vfs-3d5a648/fs/overlayfs/dir.c
+ .listxattr = ovl_listxattr,
+ .removexattr = ovl_removexattr,
+};
-diff -Nur -x .git vfs-4cbe5a5/fs/overlayfs/inode.c vfs-3d5a648/fs/overlayfs/inode.c
---- vfs-4cbe5a5/fs/overlayfs/inode.c 1970-01-01 01:00:00.000000000 +0100
-+++ vfs-3d5a648/fs/overlayfs/inode.c 2012-09-05 16:35:20.000000000 +0200
+--- /dev/null
++++ b/fs/overlayfs/inode.c
@@ -0,0 +1,372 @@
+/*
+ *
@@ -1766,17 +1753,15 @@ diff -Nur -x .git vfs-4cbe5a5/fs/overlayfs/inode.c vfs-3d5a648/fs/overlayfs/inod
+ return inode;
+
+}
-diff -Nur -x .git vfs-4cbe5a5/fs/overlayfs/Kconfig vfs-3d5a648/fs/overlayfs/Kconfig
---- vfs-4cbe5a5/fs/overlayfs/Kconfig 1970-01-01 01:00:00.000000000 +0100
-+++ vfs-3d5a648/fs/overlayfs/Kconfig 2012-09-05 16:35:20.000000000 +0200
+--- /dev/null
++++ b/fs/overlayfs/Kconfig
@@ -0,0 +1,4 @@
+config OVERLAYFS_FS
+ tristate "Overlay filesystem support"
+ help
+ Add support for overlay filesystem.
-diff -Nur -x .git vfs-4cbe5a5/fs/overlayfs/Makefile vfs-3d5a648/fs/overlayfs/Makefile
---- vfs-4cbe5a5/fs/overlayfs/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ vfs-3d5a648/fs/overlayfs/Makefile 2012-09-05 16:35:20.000000000 +0200
+--- /dev/null
++++ b/fs/overlayfs/Makefile
@@ -0,0 +1,7 @@
+#
+# Makefile for the overlay filesystem.
@@ -1785,9 +1770,8 @@ diff -Nur -x .git vfs-4cbe5a5/fs/overlayfs/Makefile vfs-3d5a648/fs/overlayfs/Mak
+obj-$(CONFIG_OVERLAYFS_FS) += overlayfs.o
+
+overlayfs-objs := super.o inode.o dir.o readdir.o copy_up.o
-diff -Nur -x .git vfs-4cbe5a5/fs/overlayfs/overlayfs.h vfs-3d5a648/fs/overlayfs/overlayfs.h
---- vfs-4cbe5a5/fs/overlayfs/overlayfs.h 1970-01-01 01:00:00.000000000 +0100
-+++ vfs-3d5a648/fs/overlayfs/overlayfs.h 2012-09-05 16:35:20.000000000 +0200
+--- /dev/null
++++ b/fs/overlayfs/overlayfs.h
@@ -0,0 +1,70 @@
+/*
+ *
@@ -1859,9 +1843,8 @@ diff -Nur -x .git vfs-4cbe5a5/fs/overlayfs/overlayfs.h vfs-3d5a648/fs/overlayfs/
+/* copy_up.c */
+int ovl_copy_up(struct dentry *dentry);
+int ovl_copy_up_truncate(struct dentry *dentry, loff_t size);
-diff -Nur -x .git vfs-4cbe5a5/fs/overlayfs/readdir.c vfs-3d5a648/fs/overlayfs/readdir.c
---- vfs-4cbe5a5/fs/overlayfs/readdir.c 1970-01-01 01:00:00.000000000 +0100
-+++ vfs-3d5a648/fs/overlayfs/readdir.c 2012-09-05 16:35:20.000000000 +0200
+--- /dev/null
++++ b/fs/overlayfs/readdir.c
@@ -0,0 +1,566 @@
+/*
+ *
@@ -2429,9 +2412,8 @@ diff -Nur -x .git vfs-4cbe5a5/fs/overlayfs/readdir.c vfs-3d5a648/fs/overlayfs/re
+
+ return err;
+}
-diff -Nur -x .git vfs-4cbe5a5/fs/overlayfs/super.c vfs-3d5a648/fs/overlayfs/super.c
---- vfs-4cbe5a5/fs/overlayfs/super.c 1970-01-01 01:00:00.000000000 +0100
-+++ vfs-3d5a648/fs/overlayfs/super.c 2012-09-05 16:35:20.000000000 +0200
+--- /dev/null
++++ b/fs/overlayfs/super.c
@@ -0,0 +1,685 @@
+/*
+ *
@@ -3118,10 +3100,9 @@ diff -Nur -x .git vfs-4cbe5a5/fs/overlayfs/super.c vfs-3d5a648/fs/overlayfs/supe
+
+module_init(ovl_init);
+module_exit(ovl_exit);
-diff -Nur -x .git vfs-4cbe5a5/fs/splice.c vfs-3d5a648/fs/splice.c
---- vfs-4cbe5a5/fs/splice.c 2012-09-01 19:39:58.000000000 +0200
-+++ vfs-3d5a648/fs/splice.c 2012-09-05 16:35:20.000000000 +0200
-@@ -1308,6 +1308,7 @@
+--- a/fs/splice.c
++++ b/fs/splice.c
+@@ -1308,6 +1308,7 @@ long do_splice_direct(struct file *in, l
return ret;
}
@@ -3129,10 +3110,9 @@ diff -Nur -x .git vfs-4cbe5a5/fs/splice.c vfs-3d5a648/fs/splice.c
static int splice_pipe_to_pipe(struct pipe_inode_info *ipipe,
struct pipe_inode_info *opipe,
-diff -Nur -x .git vfs-4cbe5a5/include/linux/fs.h vfs-3d5a648/include/linux/fs.h
---- vfs-4cbe5a5/include/linux/fs.h 2012-09-01 19:39:58.000000000 +0200
-+++ vfs-3d5a648/include/linux/fs.h 2012-09-05 16:35:20.000000000 +0200
-@@ -505,6 +505,12 @@
+--- a/include/linux/fs.h
++++ b/include/linux/fs.h
+@@ -505,6 +505,12 @@ struct iattr {
*/
#include <linux/quota.h>
@@ -3145,7 +3125,7 @@ diff -Nur -x .git vfs-4cbe5a5/include/linux/fs.h vfs-3d5a648/include/linux/fs.h
/**
* enum positive_aop_returns - aop return codes with specific semantics
*
-@@ -1578,6 +1584,11 @@
+@@ -1578,6 +1584,11 @@ struct super_block {
/* Being remounted read-only */
int s_readonly_remount;
@@ -3157,7 +3137,7 @@ diff -Nur -x .git vfs-4cbe5a5/include/linux/fs.h vfs-3d5a648/include/linux/fs.h
};
/* superblock cache pruning functions */
-@@ -1835,6 +1846,7 @@
+@@ -1835,6 +1846,7 @@ struct inode_operations {
int (*atomic_open)(struct inode *, struct dentry *,
struct file *, unsigned open_flag,
umode_t create_mode, int *opened);
@@ -3165,7 +3145,7 @@ diff -Nur -x .git vfs-4cbe5a5/include/linux/fs.h vfs-3d5a648/include/linux/fs.h
} ____cacheline_aligned;
struct seq_file;
-@@ -2199,6 +2211,7 @@
+@@ -2199,6 +2211,7 @@ extern long do_sys_open(int dfd, const c
extern struct file *filp_open(const char *, int, umode_t);
extern struct file *file_open_root(struct dentry *, struct vfsmount *,
const char *, int);
@@ -3173,7 +3153,7 @@ diff -Nur -x .git vfs-4cbe5a5/include/linux/fs.h vfs-3d5a648/include/linux/fs.h
extern struct file * dentry_open(const struct path *, int, const struct cred *);
extern int filp_close(struct file *, fl_owner_t id);
extern char * getname(const char __user *);
-@@ -2402,6 +2415,7 @@
+@@ -2402,6 +2415,7 @@ extern sector_t bmap(struct inode *, sec
#endif
extern int notify_change(struct dentry *, struct iattr *);
extern int inode_permission(struct inode *, int);
@@ -3181,10 +3161,9 @@ diff -Nur -x .git vfs-4cbe5a5/include/linux/fs.h vfs-3d5a648/include/linux/fs.h
extern int generic_permission(struct inode *, int);
static inline bool execute_ok(struct inode *inode)
-diff -Nur -x .git vfs-4cbe5a5/include/linux/mount.h vfs-3d5a648/include/linux/mount.h
---- vfs-4cbe5a5/include/linux/mount.h 2012-09-01 19:39:58.000000000 +0200
-+++ vfs-3d5a648/include/linux/mount.h 2012-09-05 16:35:20.000000000 +0200
-@@ -66,6 +66,9 @@
+--- a/include/linux/mount.h
++++ b/include/linux/mount.h
+@@ -66,6 +66,9 @@ extern void mnt_pin(struct vfsmount *mnt
extern void mnt_unpin(struct vfsmount *mnt);
extern int __mnt_is_readonly(struct vfsmount *mnt);
@@ -3194,10 +3173,9 @@ diff -Nur -x .git vfs-4cbe5a5/include/linux/mount.h vfs-3d5a648/include/linux/mo
struct file_system_type;
extern struct vfsmount *vfs_kern_mount(struct file_system_type *type,
int flags, const char *name,
-diff -Nur -x .git vfs-4cbe5a5/MAINTAINERS vfs-3d5a648/MAINTAINERS
---- vfs-4cbe5a5/MAINTAINERS 2012-09-01 19:39:58.000000000 +0200
-+++ vfs-3d5a648/MAINTAINERS 2012-09-05 16:35:20.000000000 +0200
-@@ -5103,6 +5103,13 @@
+--- a/MAINTAINERS
++++ b/MAINTAINERS
+@@ -5105,6 +5105,13 @@ F: drivers/scsi/osd/
F: include/scsi/osd_*
F: fs/exofs/