-diff --git a/Documentation/filesystems/Locking b/Documentation/filesystems/Locking
-index 0706d32..4331290 100644
--- a/Documentation/filesystems/Locking
+++ b/Documentation/filesystems/Locking
@@ -66,6 +66,7 @@ prototypes:
Additionally, ->rmdir(), ->unlink() and ->rename() have ->i_mutex on
victim.
-diff --git a/Documentation/filesystems/overlayfs.txt b/Documentation/filesystems/overlayfs.txt
-new file mode 100644
-index 0000000..00dbab0
--- /dev/null
+++ b/Documentation/filesystems/overlayfs.txt
@@ -0,0 +1,199 @@
+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 --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt
-index bc4b06b..f64a4d1 100644
--- a/Documentation/filesystems/vfs.txt
+++ b/Documentation/filesystems/vfs.txt
@@ -362,6 +362,7 @@ struct inode_operations {
invalidatepage: If a page has PagePrivate set, then invalidatepage
will be called when part or all of the page is to be removed
-diff --git a/MAINTAINERS b/MAINTAINERS
-index 9561658..9ea89b8 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -5872,6 +5872,13 @@ F: drivers/scsi/osd/
P54 WIRELESS DRIVER
M: Christian Lamparter <chunkeey@googlemail.com>
L: linux-wireless@vger.kernel.org
-diff --git a/fs/Kconfig b/fs/Kconfig
-index 780725a..9e2ccd5 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -67,6 +67,7 @@ source "fs/quota/Kconfig"
config GENERIC_ACL
bool
-diff --git a/fs/Makefile b/fs/Makefile
-index 9d53192..479a720 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -107,6 +107,7 @@ obj-$(CONFIG_QNX6FS_FS) += qnx6/
obj-$(CONFIG_UDF_FS) += udf/
obj-$(CONFIG_SUN_OPENPROMFS) += openpromfs/
obj-$(CONFIG_OMFS_FS) += omfs/
-diff --git a/fs/ecryptfs/main.c b/fs/ecryptfs/main.c
-index e924cf4..8f7551e 100644
--- a/fs/ecryptfs/main.c
+++ b/fs/ecryptfs/main.c
-@@ -567,6 +567,13 @@ static struct dentry *ecryptfs_mount(struct file_system_type *fs_type, int flags
+@@ -567,6 +567,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;
inode = ecryptfs_get_inode(path.dentry->d_inode, s);
rc = PTR_ERR(inode);
-diff --git a/fs/internal.h b/fs/internal.h
-index 507141f..89481ac 100644
--- a/fs/internal.h
+++ b/fs/internal.h
-@@ -42,11 +42,6 @@ static inline int __sync_blockdev(struct block_device *bdev, int wait)
+@@ -42,11 +42,6 @@ static inline int __sync_blockdev(struct
extern void __init chrdev_init(void);
/*
* namespace.c
*/
extern int copy_mount_options(const void __user *, unsigned long *);
-diff --git a/fs/namei.c b/fs/namei.c
-index 57ae9c8..e1cffbd 100644
--- a/fs/namei.c
+++ b/fs/namei.c
-@@ -402,6 +402,7 @@ int __inode_permission(struct inode *inode, int mask)
+@@ -402,6 +402,7 @@ int __inode_permission(struct inode *ino
return security_inode_permission(inode, mask);
}
if (error == -EOPENSTALE)
goto stale_open;
goto out;
-diff --git a/fs/namespace.c b/fs/namespace.c
-index 50ca17d..9791b4e 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
-@@ -1399,6 +1399,24 @@ void drop_collected_mounts(struct vfsmount *mnt)
+@@ -1399,6 +1399,24 @@ void drop_collected_mounts(struct vfsmou
release_mounts(&umount_list);
}
int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
struct vfsmount *root)
{
-diff --git a/fs/open.c b/fs/open.c
-index 6835446..b9d9f9e 100644
--- a/fs/open.c
+++ b/fs/open.c
-@@ -828,8 +828,7 @@ struct file *dentry_open(const struct path *path, int flags,
+@@ -828,8 +828,7 @@ struct file *dentry_open(const struct pa
f = get_empty_filp();
if (!IS_ERR(f)) {
f->f_flags = flags;
if (!error) {
/* from now on we need fput() to dispose of f */
error = open_check_o_direct(f);
-@@ -846,6 +845,26 @@ struct file *dentry_open(const struct path *path, int flags,
+@@ -846,6 +845,26 @@ struct file *dentry_open(const struct pa
}
EXPORT_SYMBOL(dentry_open);
static inline int build_open_flags(int flags, umode_t mode, struct open_flags *op)
{
int lookup_flags = 0;
-diff --git a/fs/overlayfs/Kconfig b/fs/overlayfs/Kconfig
-new file mode 100644
-index 0000000..c4517da
--- /dev/null
+++ b/fs/overlayfs/Kconfig
@@ -0,0 +1,4 @@
+ tristate "Overlay filesystem support"
+ help
+ Add support for overlay filesystem.
-diff --git a/fs/overlayfs/Makefile b/fs/overlayfs/Makefile
-new file mode 100644
-index 0000000..8f91889
--- /dev/null
+++ b/fs/overlayfs/Makefile
@@ -0,0 +1,7 @@
+obj-$(CONFIG_OVERLAYFS_FS) += overlayfs.o
+
+overlayfs-objs := super.o inode.o dir.o readdir.o copy_up.o
-diff --git a/fs/overlayfs/copy_up.c b/fs/overlayfs/copy_up.c
-new file mode 100644
-index 0000000..eef85e0
--- /dev/null
+++ b/fs/overlayfs/copy_up.c
@@ -0,0 +1,385 @@
+ dput(parent);
+ return err;
+}
-diff --git a/fs/overlayfs/dir.c b/fs/overlayfs/dir.c
-new file mode 100644
-index 0000000..b530e56
--- /dev/null
+++ b/fs/overlayfs/dir.c
@@ -0,0 +1,604 @@
+ .listxattr = ovl_listxattr,
+ .removexattr = ovl_removexattr,
+};
-diff --git a/fs/overlayfs/inode.c b/fs/overlayfs/inode.c
-new file mode 100644
-index 0000000..ee37e92
--- /dev/null
+++ b/fs/overlayfs/inode.c
@@ -0,0 +1,372 @@
+ return inode;
+
+}
-diff --git a/fs/overlayfs/overlayfs.h b/fs/overlayfs/overlayfs.h
-new file mode 100644
-index 0000000..1cba38f
--- /dev/null
+++ b/fs/overlayfs/overlayfs.h
@@ -0,0 +1,70 @@
+/* copy_up.c */
+int ovl_copy_up(struct dentry *dentry);
+int ovl_copy_up_truncate(struct dentry *dentry, loff_t size);
-diff --git a/fs/overlayfs/readdir.c b/fs/overlayfs/readdir.c
-new file mode 100644
-index 0000000..0797efb
--- /dev/null
+++ b/fs/overlayfs/readdir.c
@@ -0,0 +1,566 @@
+
+ return err;
+}
-diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
-new file mode 100644
-index 0000000..357d6e8
--- /dev/null
+++ b/fs/overlayfs/super.c
@@ -0,0 +1,685 @@
+
+module_init(ovl_init);
+module_exit(ovl_exit);
-diff --git a/fs/splice.c b/fs/splice.c
-index 718bd00..0e8f44a 100644
--- a/fs/splice.c
+++ b/fs/splice.c
-@@ -1308,6 +1308,7 @@ long do_splice_direct(struct file *in, loff_t *ppos, struct file *out,
+@@ -1308,6 +1308,7 @@ long do_splice_direct(struct file *in, l
return ret;
}
static int splice_pipe_to_pipe(struct pipe_inode_info *ipipe,
struct pipe_inode_info *opipe,
-diff --git a/include/linux/fs.h b/include/linux/fs.h
-index 2c28271..3353de6 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -244,6 +244,12 @@ struct iattr {
} ____cacheline_aligned;
ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
-@@ -2006,6 +2018,7 @@ extern struct file *file_open_name(struct filename *, int, umode_t);
+@@ -2006,6 +2018,7 @@ extern struct file *file_open_name(struc
extern struct file *filp_open(const char *, int, umode_t);
extern struct file *file_open_root(struct dentry *, struct vfsmount *,
const char *, int);
extern struct file * dentry_open(const struct path *, int, const struct cred *);
extern int filp_close(struct file *, fl_owner_t id);
-@@ -2211,6 +2224,7 @@ extern sector_t bmap(struct inode *, sector_t);
+@@ -2211,6 +2224,7 @@ extern sector_t bmap(struct inode *, sec
#endif
extern int notify_change(struct dentry *, struct iattr *);
extern int inode_permission(struct inode *, int);
extern int generic_permission(struct inode *, int);
static inline bool execute_ok(struct inode *inode)
-diff --git a/include/linux/mount.h b/include/linux/mount.h
-index d7029f4..344a262 100644
--- a/include/linux/mount.h
+++ b/include/linux/mount.h
-@@ -66,6 +66,9 @@ extern void mnt_pin(struct vfsmount *mnt);
+@@ -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);