endif # MISC_FILESYSTEMS
diff --git a/fs/Makefile b/fs/Makefile
-index cb92fd4..8c2df12 100644
+index cb20e4b..dd81418 100644
--- a/fs/Makefile
+++ b/fs/Makefile
-@@ -127,3 +127,4 @@ obj-y += exofs/ # Multiple modules
+@@ -126,3 +126,4 @@ obj-y += exofs/ # Multiple modules
obj-$(CONFIG_CEPH_FS) += ceph/
obj-$(CONFIG_PSTORE) += pstore/
obj-$(CONFIG_EFIVAR_FS) += efivarfs/
+obj-$(CONFIG_AUFS_FS) += aufs/
diff --git a/include/uapi/linux/Kbuild b/include/uapi/linux/Kbuild
-index 1a0006a..ddad01a 100644
+index 1ff9942..31efc0a 100644
--- a/include/uapi/linux/Kbuild
+++ b/include/uapi/linux/Kbuild
@@ -59,6 +59,7 @@ header-y += atmsvc.h
aufs4.x-rcN base patch
diff --git a/MAINTAINERS b/MAINTAINERS
-index d8afd29..feac5ea 100644
+index 8133cef..04beb19 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
-@@ -1880,6 +1880,19 @@ F: include/linux/audit.h
+@@ -1939,6 +1939,19 @@ F: include/linux/audit.h
F: include/uapi/linux/audit.h
F: kernel/audit*
M: Miguel Ojeda Sandonis <miguel.ojeda.sandonis@gmail.com>
W: http://miguelojeda.es/auxdisplay.htm
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
-index d7173cb..0160952 100644
+index f7a4c9d..23103ad 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
-@@ -540,6 +540,24 @@ static inline int is_loop_device(struct file *file)
+@@ -560,6 +560,24 @@ static inline int is_loop_device(struct file *file)
return i && S_ISBLK(i->i_mode) && MAJOR(i->i_rdev) == LOOP_MAJOR;
}
static ssize_t loop_attr_show(struct device *dev, char *page,
diff --git a/fs/dcache.c b/fs/dcache.c
-index 37b5afd..bc261e2 100644
+index 7a3f3e5..0b40298 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1164,7 +1164,7 @@ enum d_walk_ret {
{
mm_segment_t old_fs;
diff --git a/fs/splice.c b/fs/splice.c
-index bfe62ae..fa5eee5 100644
+index 5fc1e50..5f8385a 100644
--- a/fs/splice.c
+++ b/fs/splice.c
-@@ -1101,8 +1101,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
+@@ -1102,8 +1102,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
/*
* Attempt to initiate a splice from pipe to file.
*/
{
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
loff_t *, size_t, unsigned int);
-@@ -1118,9 +1118,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+@@ -1119,9 +1119,9 @@ static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
/*
* Attempt to initiate a splice from a file to a pipe.
*/
static inline void fput_light(struct file *file, int fput_needed)
{
diff --git a/include/linux/fs.h b/include/linux/fs.h
-index 35ec87e..3229f97 100644
+index a0653e5..86080ea 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
-@@ -1649,6 +1649,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
+@@ -1661,6 +1661,12 @@ ssize_t rw_copy_check_uvector(int type, const struct iovec __user * uvector,
struct iovec *fast_pointer,
struct iovec **ret_pointer);
aufs4.x-rcN mmap patch
diff --git a/fs/buffer.c b/fs/buffer.c
-index c7a5602..8c50a22 100644
+index 1cf7a53..076aff86 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
-@@ -2450,7 +2450,7 @@ int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
+@@ -2473,7 +2473,7 @@ int block_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf,
* Update file times before taking page lock. We may end up failing the
* fault so this update may be superfluous but who really cares...
*/
ret = __block_page_mkwrite(vma, vmf, get_block);
sb_end_pagefault(sb);
diff --git a/fs/proc/base.c b/fs/proc/base.c
-index 093ca14..fc1ac03 100644
+index 87782e8..b287e64 100644
--- a/fs/proc/base.c
+++ b/fs/proc/base.c
-@@ -1744,7 +1744,7 @@ static int proc_map_files_get_link(struct dentry *dentry, struct path *path)
+@@ -1934,7 +1934,7 @@ static int proc_map_files_get_link(struct dentry *dentry, struct path *path)
down_read(&mm->mmap_sem);
vma = find_exact_vma(mm, vm_start, vm_end);
if (vma && vma->vm_file) {
rc = 0;
}
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
-index d4a3574..1397181 100644
+index f8595e8..cb8eda0 100644
--- a/fs/proc/nommu.c
+++ b/fs/proc/nommu.c
@@ -45,7 +45,10 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region)
ino = inode->i_ino;
}
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
-index 6dee68d..9afa35d 100644
+index ca1e091..8940e47 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -279,7 +279,10 @@ show_map_vma(struct seq_file *m, struct vm_area_struct *vma, int is_pid)
struct mm_walk walk = {
.hugetlb_entry = gather_hugetlb_stats,
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
-index 599ec2e..1740207 100644
+index e0d64c9..7aa92db 100644
--- a/fs/proc/task_nommu.c
+++ b/fs/proc/task_nommu.c
@@ -160,7 +160,10 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma,
ino = inode->i_ino;
pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT;
diff --git a/include/linux/mm.h b/include/linux/mm.h
-index 0755b9f..2ee5500 100644
+index 2e872f9..2494ed2 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
-@@ -1172,6 +1172,28 @@ static inline int fixup_user_fault(struct task_struct *tsk,
+@@ -1173,6 +1173,28 @@ static inline int fixup_user_fault(struct task_struct *tsk,
}
#endif
extern int access_remote_vm(struct mm_struct *mm, unsigned long addr,
void *buf, int len, int write);
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
-index 8d37e26..ce89d4c 100644
+index 0038ac7..409940d 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
-@@ -241,6 +241,7 @@ struct vm_region {
+@@ -259,6 +259,7 @@ struct vm_region {
unsigned long vm_top; /* region allocated to here */
unsigned long vm_pgoff; /* the offset in vm_file corresponding to vm_start */
struct file *vm_file; /* the backing file or NULL */
int vm_usage; /* region usage count (access under nommu_region_sem) */
bool vm_icache_flushed : 1; /* true if the icache has been flushed for
-@@ -305,6 +306,7 @@ struct vm_area_struct {
+@@ -323,6 +324,7 @@ struct vm_area_struct {
unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE
units, *not* PAGE_CACHE_SIZE */
struct file * vm_file; /* File we map to (can be NULL). */
#ifndef CONFIG_MMU
diff --git a/kernel/fork.c b/kernel/fork.c
-index 03c1eaa..7e215ba 100644
+index 1bfefc6..a86bd7f 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -456,7 +456,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
obj-y += init-mm.o
diff --git a/mm/filemap.c b/mm/filemap.c
-index 6bf5e42..a863d0f 100644
+index 1283fc8..128f18f 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
-@@ -2062,7 +2062,7 @@ int filemap_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
+@@ -2089,7 +2089,7 @@ int filemap_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
int ret = VM_FAULT_LOCKED;
sb_start_pagefault(inode->i_sb);
lock_page(page);
if (page->mapping != inode->i_mapping) {
unlock_page(page);
-diff --git a/mm/madvise.c b/mm/madvise.c
-index d551475..1ebf71b 100644
---- a/mm/madvise.c
-+++ b/mm/madvise.c
-@@ -320,12 +320,12 @@ static long madvise_remove(struct vm_area_struct *vma,
- * vma's reference to the file) can go away as soon as we drop
- * mmap_sem.
- */
-- get_file(f);
-+ vma_get_file(vma);
- up_read(¤t->mm->mmap_sem);
- error = vfs_fallocate(f,
- FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE,
- offset, end - start);
-- fput(f);
-+ vma_fput(vma);
- down_read(¤t->mm->mmap_sem);
- return error;
- }
diff --git a/mm/memory.c b/mm/memory.c
-index 22e037e..62096a2 100644
+index a84fbb7..13973d2 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2034,7 +2034,7 @@ static inline int wp_page_reuse(struct mm_struct *mm,
return VM_FAULT_WRITE;
diff --git a/mm/mmap.c b/mm/mmap.c
-index bb50cac..1ab5e596 100644
+index aa632ad..3ff75d3 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -274,7 +274,7 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
if (new_vma->vm_ops && new_vma->vm_ops->open)
new_vma->vm_ops->open(new_vma);
vma_link(mm, new_vma, prev, rb_link, rb_parent);
-diff --git a/mm/msync.c b/mm/msync.c
-index bb04d53..5c24c54 100644
---- a/mm/msync.c
-+++ b/mm/msync.c
-@@ -84,10 +84,10 @@ SYSCALL_DEFINE3(msync, unsigned long, start, size_t, len, int, flags)
- start = vma->vm_end;
- if ((flags & MS_SYNC) && file &&
- (vma->vm_flags & VM_SHARED)) {
-- get_file(file);
-+ vma_get_file(vma);
- up_read(&mm->mmap_sem);
- error = vfs_fsync_range(file, fstart, fend, 1);
-- fput(file);
-+ vma_fput(vma);
- if (error || start >= end)
- goto out;
- down_read(&mm->mmap_sem);
diff --git a/mm/nommu.c b/mm/nommu.c
-index e544508..dd6f74a 100644
+index 58ea364..f937b7e 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
-@@ -693,7 +693,7 @@ static void __put_nommu_region(struct vm_region *region)
+@@ -671,7 +671,7 @@ static void __put_nommu_region(struct vm_region *region)
up_write(&nommu_region_sem);
if (region->vm_file)
/* IO memory and memory shared directly out of the pagecache
* from ramfs/tmpfs mustn't be released here */
-@@ -858,7 +858,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma)
+@@ -829,7 +829,7 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma)
if (vma->vm_ops && vma->vm_ops->close)
vma->vm_ops->close(vma);
if (vma->vm_file)
put_nommu_region(vma->vm_region);
kmem_cache_free(vm_area_cachep, vma);
}
-@@ -1398,7 +1398,7 @@ unsigned long do_mmap_pgoff(struct file *file,
+@@ -1354,7 +1354,7 @@ unsigned long do_mmap_pgoff(struct file *file,
goto error_just_free;
}
}
kmem_cache_free(vm_region_jar, region);
region = pregion;
result = start;
-@@ -1474,10 +1474,10 @@ error_just_free:
+@@ -1429,10 +1429,10 @@ error_just_free:
up_write(&nommu_region_sem);
error:
if (region->vm_file)
- fput(vma->vm_file);
+ vma_fput(vma);
kmem_cache_free(vm_area_cachep, vma);
- kleave(" = %d", ret);
return ret;
+
diff --git a/mm/prfile.c b/mm/prfile.c
new file mode 100644
-index 0000000..6aa5ab5
+index 0000000..b323b8a
--- /dev/null
+++ b/mm/prfile.c
@@ -0,0 +1,86 @@
+{
+#ifdef PRFILE_TRACE
+ if (pr)
-+ pr_info("%s:%d: %s, %p\n", func, line, func2,
++ pr_info("%s:%d: %s, %s\n", func, line, func2,
+ f ? (char *)f->f_path.dentry->d_name.name : "(null)");
+#endif
+}
aufs4.x-rcN standalone patch
diff --git a/fs/dcache.c b/fs/dcache.c
-index bc261e2..8d7951d 100644
+index 0b40298..4844e61 100644
--- a/fs/dcache.c
+++ b/fs/dcache.c
@@ -1269,6 +1269,7 @@ rename_retry:
/*
* Search for at least 1 mount point in the dentry's subdirs.
diff --git a/fs/file_table.c b/fs/file_table.c
-index 294174d..3cea027 100644
+index 7f9d407..8c9ec1d 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
-@@ -147,6 +147,7 @@ over:
+@@ -146,6 +146,7 @@ over:
}
return ERR_PTR(-ENFILE);
}
/**
* alloc_file - allocate and initialize a 'struct file'
-@@ -308,6 +309,7 @@ void put_filp(struct file *file)
+@@ -307,6 +308,7 @@ void put_filp(struct file *file)
file_free(file);
}
}
void __init files_init(unsigned long mempages)
{
diff --git a/fs/inode.c b/fs/inode.c
-index ea37cd1..58f5f58 100644
+index d30640f..1ecc715 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -58,6 +58,7 @@ static struct hlist_head *inode_hashtable __read_mostly;
/*
* Empty aops. Can be used for the cases where the user does not
diff --git a/fs/namespace.c b/fs/namespace.c
-index 1b9e111..d45b81b 100644
+index c7cb8a5..08723de 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -463,6 +463,7 @@ void __mnt_drop_write(struct vfsmount *mnt)
/**
* mnt_drop_write - give up write access to a mount
-@@ -1768,6 +1769,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
+@@ -1779,6 +1780,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
}
return 0;
}
static int fsnotify_mark_destroy(void *ignored)
{
diff --git a/fs/open.c b/fs/open.c
-index 98e5a52..a94e2e7 100644
+index e33dab2..b84b828 100644
--- a/fs/open.c
+++ b/fs/open.c
-@@ -62,6 +62,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
+@@ -64,6 +64,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
mutex_unlock(&dentry->d_inode->i_mutex);
return ret;
}
long vfs_truncate(struct path *path, loff_t length)
{
-@@ -676,6 +677,7 @@ int open_check_o_direct(struct file *f)
+@@ -678,6 +679,7 @@ int open_check_o_direct(struct file *f)
}
return 0;
}
+EXPORT_SYMBOL(open_check_o_direct);
static int do_dentry_open(struct file *f,
- int (*open)(struct inode *, struct file *),
+ struct inode *inode,
diff --git a/fs/read_write.c b/fs/read_write.c
index fd0414e..8ace6ec 100644
--- a/fs/read_write.c
ssize_t __kernel_write(struct file *file, const char *buf, size_t count, loff_t *pos)
{
diff --git a/fs/splice.c b/fs/splice.c
-index fa5eee5..bfb3324 100644
+index 5f8385a..f76067e 100644
--- a/fs/splice.c
+++ b/fs/splice.c
-@@ -1114,6 +1114,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+@@ -1115,6 +1115,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
return splice_write(pipe, out, ppos, len, flags);
}
/*
* Attempt to initiate a splice from a file to a pipe.
-@@ -1140,6 +1141,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
+@@ -1141,6 +1142,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
return splice_read(in, ppos, pipe, len, flags);
}
/**
* splice_direct_to_actor - splices data directly between two non-pipes
diff --git a/fs/xattr.c b/fs/xattr.c
-index 4ef6985..6bb6303 100644
+index 072fee1..a7677af 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -207,6 +207,7 @@ vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value,
/* Compare an extended attribute value with the given value */
int vfs_xattr_cmp(struct dentry *dentry, const char *xattr_name,
diff --git a/security/commoncap.c b/security/commoncap.c
-index f2875cd..ebf06ec 100644
+index d103f5a4..393654e 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
-@@ -975,9 +975,11 @@ int cap_mmap_addr(unsigned long addr)
+@@ -970,12 +970,14 @@ int cap_mmap_addr(unsigned long addr)
}
return ret;
}
return 0;
}
+EXPORT_SYMBOL(cap_mmap_file);
+
+ #ifdef CONFIG_SECURITY
+
diff --git a/security/device_cgroup.c b/security/device_cgroup.c
index 188c1d2..426d9af 100644
--- a/security/device_cgroup.c
int devcgroup_inode_mknod(int mode, dev_t dev)
{
diff --git a/security/security.c b/security/security.c
-index 8e9b1f4..c1c7cd1 100644
+index 595fffa..346bad6 100644
--- a/security/security.c
+++ b/security/security.c
-@@ -430,6 +430,7 @@ int security_path_rmdir(struct path *dir, struct dentry *dentry)
+@@ -438,6 +438,7 @@ int security_path_rmdir(struct path *dir, struct dentry *dentry)
return 0;
- return security_ops->path_rmdir(dir, dentry);
+ return call_int_hook(path_rmdir, 0, dir, dentry);
}
+EXPORT_SYMBOL(security_path_rmdir);
int security_path_unlink(struct path *dir, struct dentry *dentry)
{
-@@ -446,6 +447,7 @@ int security_path_symlink(struct path *dir, struct dentry *dentry,
+@@ -454,6 +455,7 @@ int security_path_symlink(struct path *dir, struct dentry *dentry,
return 0;
- return security_ops->path_symlink(dir, dentry, old_name);
+ return call_int_hook(path_symlink, 0, dir, dentry, old_name);
}
+EXPORT_SYMBOL(security_path_symlink);
int security_path_link(struct dentry *old_dentry, struct path *new_dir,
struct dentry *new_dentry)
-@@ -454,6 +456,7 @@ int security_path_link(struct dentry *old_dentry, struct path *new_dir,
+@@ -462,6 +464,7 @@ int security_path_link(struct dentry *old_dentry, struct path *new_dir,
return 0;
- return security_ops->path_link(old_dentry, new_dir, new_dentry);
+ return call_int_hook(path_link, 0, old_dentry, new_dir, new_dentry);
}
+EXPORT_SYMBOL(security_path_link);
int security_path_rename(struct path *old_dir, struct dentry *old_dentry,
struct path *new_dir, struct dentry *new_dentry,
-@@ -481,6 +484,7 @@ int security_path_truncate(struct path *path)
+@@ -489,6 +492,7 @@ int security_path_truncate(struct path *path)
return 0;
- return security_ops->path_truncate(path);
+ return call_int_hook(path_truncate, 0, path);
}
+EXPORT_SYMBOL(security_path_truncate);
int security_path_chmod(struct path *path, umode_t mode)
{
-@@ -488,6 +492,7 @@ int security_path_chmod(struct path *path, umode_t mode)
+@@ -496,6 +500,7 @@ int security_path_chmod(struct path *path, umode_t mode)
return 0;
- return security_ops->path_chmod(path, mode);
+ return call_int_hook(path_chmod, 0, path, mode);
}
+EXPORT_SYMBOL(security_path_chmod);
int security_path_chown(struct path *path, kuid_t uid, kgid_t gid)
{
-@@ -495,6 +500,7 @@ int security_path_chown(struct path *path, kuid_t uid, kgid_t gid)
+@@ -503,6 +508,7 @@ int security_path_chown(struct path *path, kuid_t uid, kgid_t gid)
return 0;
- return security_ops->path_chown(path, uid, gid);
+ return call_int_hook(path_chown, 0, path, uid, gid);
}
+EXPORT_SYMBOL(security_path_chown);
int security_path_chroot(struct path *path)
{
-@@ -580,6 +586,7 @@ int security_inode_readlink(struct dentry *dentry)
+@@ -588,6 +594,7 @@ int security_inode_readlink(struct dentry *dentry)
return 0;
- return security_ops->inode_readlink(dentry);
+ return call_int_hook(inode_readlink, 0, dentry);
}
+EXPORT_SYMBOL(security_inode_readlink);
- int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd)
- {
-@@ -594,6 +601,7 @@ int security_inode_permission(struct inode *inode, int mask)
+ int security_inode_follow_link(struct dentry *dentry, struct inode *inode,
+ bool rcu)
+@@ -603,6 +610,7 @@ int security_inode_permission(struct inode *inode, int mask)
return 0;
- return security_ops->inode_permission(inode, mask);
+ return call_int_hook(inode_permission, 0, inode, mask);
}
+EXPORT_SYMBOL(security_inode_permission);
int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
{
-@@ -716,6 +724,7 @@ int security_file_permission(struct file *file, int mask)
+@@ -741,6 +749,7 @@ int security_file_permission(struct file *file, int mask)
return fsnotify_perm(file, mask);
}
int security_file_alloc(struct file *file)
{
-@@ -775,6 +784,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
+@@ -800,6 +809,7 @@ int security_mmap_file(struct file *file, unsigned long prot,
return ret;
return ima_file_mmap(file, prot);
}
{
diff -urN /usr/share/empty/Documentation/ABI/testing/debugfs-aufs linux/Documentation/ABI/testing/debugfs-aufs
--- /usr/share/empty/Documentation/ABI/testing/debugfs-aufs 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/ABI/testing/debugfs-aufs 2015-06-28 17:35:44.344717109 +0200
++++ linux/Documentation/ABI/testing/debugfs-aufs 2015-09-24 10:47:58.244719488 +0200
@@ -0,0 +1,50 @@
+What: /debug/aufs/si_<id>/
+Date: March 2009
+ will be empty. About XINO files, see the aufs manual.
diff -urN /usr/share/empty/Documentation/ABI/testing/sysfs-aufs linux/Documentation/ABI/testing/sysfs-aufs
--- /usr/share/empty/Documentation/ABI/testing/sysfs-aufs 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/ABI/testing/sysfs-aufs 2015-06-28 17:35:44.344717109 +0200
++++ linux/Documentation/ABI/testing/sysfs-aufs 2015-09-24 10:47:58.244719488 +0200
@@ -0,0 +1,31 @@
+What: /sys/fs/aufs/si_<id>/
+Date: March 2009
+ will be empty. About XINO files, see the aufs manual.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt linux/Documentation/filesystems/aufs/design/01intro.txt
--- /usr/share/empty/Documentation/filesystems/aufs/design/01intro.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/01intro.txt 2015-06-28 17:35:44.344717109 +0200
++++ linux/Documentation/filesystems/aufs/design/01intro.txt 2015-09-24 10:47:58.244719488 +0200
@@ -0,0 +1,170 @@
+
+# Copyright (C) 2005-2015 Junjiro R. Okajima
+about it. But currently I have implemented it in kernel space.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt linux/Documentation/filesystems/aufs/design/02struct.txt
--- /usr/share/empty/Documentation/filesystems/aufs/design/02struct.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/02struct.txt 2015-06-28 17:35:44.344717109 +0200
++++ linux/Documentation/filesystems/aufs/design/02struct.txt 2015-09-24 10:47:58.244719488 +0200
@@ -0,0 +1,258 @@
+
+# Copyright (C) 2005-2015 Junjiro R. Okajima
+For this purpose, use "aumvdown" command in aufs-util.git.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03atomic_open.txt linux/Documentation/filesystems/aufs/design/03atomic_open.txt
--- /usr/share/empty/Documentation/filesystems/aufs/design/03atomic_open.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/03atomic_open.txt 2015-06-28 17:35:44.344717109 +0200
++++ linux/Documentation/filesystems/aufs/design/03atomic_open.txt 2015-09-24 10:47:58.244719488 +0200
@@ -0,0 +1,85 @@
+
+# Copyright (C) 2015 Junjiro R. Okajima
+ be implemented in aufs, but not all I am afraid.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt linux/Documentation/filesystems/aufs/design/03lookup.txt
--- /usr/share/empty/Documentation/filesystems/aufs/design/03lookup.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/03lookup.txt 2015-06-28 17:35:44.344717109 +0200
++++ linux/Documentation/filesystems/aufs/design/03lookup.txt 2015-09-24 10:47:58.244719488 +0200
@@ -0,0 +1,113 @@
+
+# Copyright (C) 2005-2015 Junjiro R. Okajima
+ by over-mounting something (or another method).
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt linux/Documentation/filesystems/aufs/design/04branch.txt
--- /usr/share/empty/Documentation/filesystems/aufs/design/04branch.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/04branch.txt 2015-06-28 17:35:44.344717109 +0200
++++ linux/Documentation/filesystems/aufs/design/04branch.txt 2015-09-24 10:47:58.244719488 +0200
@@ -0,0 +1,74 @@
+
+# Copyright (C) 2005-2015 Junjiro R. Okajima
+ same named entry on the upper branch.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.txt linux/Documentation/filesystems/aufs/design/05wbr_policy.txt
--- /usr/share/empty/Documentation/filesystems/aufs/design/05wbr_policy.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/05wbr_policy.txt 2015-06-28 17:35:44.344717109 +0200
++++ linux/Documentation/filesystems/aufs/design/05wbr_policy.txt 2015-09-24 10:47:58.244719488 +0200
@@ -0,0 +1,64 @@
+
+# Copyright (C) 2005-2015 Junjiro R. Okajima
+ copyup policy.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06fhsm.txt linux/Documentation/filesystems/aufs/design/06fhsm.txt
--- /usr/share/empty/Documentation/filesystems/aufs/design/06fhsm.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06fhsm.txt 2015-06-28 17:35:44.344717109 +0200
++++ linux/Documentation/filesystems/aufs/design/06fhsm.txt 2015-09-24 10:47:58.244719488 +0200
@@ -0,0 +1,120 @@
+
+# Copyright (C) 2011-2015 Junjiro R. Okajima
+should restore the original file state after an error happens.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt linux/Documentation/filesystems/aufs/design/06mmap.txt
--- /usr/share/empty/Documentation/filesystems/aufs/design/06mmap.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06mmap.txt 2015-06-28 17:35:44.344717109 +0200
++++ linux/Documentation/filesystems/aufs/design/06mmap.txt 2015-09-24 10:47:58.244719488 +0200
@@ -0,0 +1,72 @@
+
+# Copyright (C) 2005-2015 Junjiro R. Okajima
+I have to give up this "looks-smater" approach.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/06xattr.txt linux/Documentation/filesystems/aufs/design/06xattr.txt
--- /usr/share/empty/Documentation/filesystems/aufs/design/06xattr.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/06xattr.txt 2015-06-28 17:35:44.344717109 +0200
++++ linux/Documentation/filesystems/aufs/design/06xattr.txt 2015-09-24 10:47:58.244719488 +0200
@@ -0,0 +1,96 @@
+
+# Copyright (C) 2014-2015 Junjiro R. Okajima
+now, aufs implements the branch attributes to ignore the error.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt linux/Documentation/filesystems/aufs/design/07export.txt
--- /usr/share/empty/Documentation/filesystems/aufs/design/07export.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/07export.txt 2015-06-28 17:35:44.344717109 +0200
++++ linux/Documentation/filesystems/aufs/design/07export.txt 2015-09-24 10:47:58.248052907 +0200
@@ -0,0 +1,58 @@
+
+# Copyright (C) 2005-2015 Junjiro R. Okajima
+ lookup_one_len(), vfs_getattr(), encode_fh() and others.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt linux/Documentation/filesystems/aufs/design/08shwh.txt
--- /usr/share/empty/Documentation/filesystems/aufs/design/08shwh.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/08shwh.txt 2015-06-28 17:35:44.344717109 +0200
++++ linux/Documentation/filesystems/aufs/design/08shwh.txt 2015-09-24 10:47:58.248052907 +0200
@@ -0,0 +1,52 @@
+
+# Copyright (C) 2005-2015 Junjiro R. Okajima
+initramfs will use it to replace the old one at the next boot.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt linux/Documentation/filesystems/aufs/design/10dynop.txt
--- /usr/share/empty/Documentation/filesystems/aufs/design/10dynop.txt 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/design/10dynop.txt 2015-06-28 17:35:44.344717109 +0200
++++ linux/Documentation/filesystems/aufs/design/10dynop.txt 2015-09-24 10:47:58.248052907 +0200
@@ -0,0 +1,47 @@
+
+# Copyright (C) 2010-2015 Junjiro R. Okajima
+regular files only.
diff -urN /usr/share/empty/Documentation/filesystems/aufs/README linux/Documentation/filesystems/aufs/README
--- /usr/share/empty/Documentation/filesystems/aufs/README 1970-01-01 01:00:00.000000000 +0100
-+++ linux/Documentation/filesystems/aufs/README 2015-06-28 17:35:44.344717109 +0200
++++ linux/Documentation/filesystems/aufs/README 2015-09-24 10:47:58.244719488 +0200
@@ -0,0 +1,383 @@
+
+Aufs4 -- advanced multi layered unification filesystem version 4.x
+The Parted Magic Project made a donation (2013/9 and 11).
+Pavel Barta made a donation (2013/10).
+Nikolay Pertsev made a donation (2014/5).
-+James B made a donation (2014/7).
++James B made a donation (2014/7 and 2015/7).
+Stefano Di Biase made a donation (2014/8).
+Daniel Epellei made a donation (2015/1).
+
+# End: ;
diff -urN /usr/share/empty/fs/aufs/aufs.h linux/fs/aufs/aufs.h
--- /usr/share/empty/fs/aufs/aufs.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/aufs.h 2015-06-28 17:35:44.344717109 +0200
++++ linux/fs/aufs/aufs.h 2015-09-24 10:47:58.248052907 +0200
@@ -0,0 +1,59 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+#endif /* __AUFS_H__ */
diff -urN /usr/share/empty/fs/aufs/branch.c linux/fs/aufs/branch.c
--- /usr/share/empty/fs/aufs/branch.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/branch.c 2015-06-28 17:36:09.025073697 +0200
++++ linux/fs/aufs/branch.c 2015-09-24 10:47:58.248052907 +0200
@@ -0,0 +1,1414 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/branch.h linux/fs/aufs/branch.h
--- /usr/share/empty/fs/aufs/branch.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/branch.h 2015-06-28 17:36:09.025073697 +0200
++++ linux/fs/aufs/branch.h 2015-09-24 10:47:58.248052907 +0200
@@ -0,0 +1,279 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+#endif /* __AUFS_BRANCH_H__ */
diff -urN /usr/share/empty/fs/aufs/conf.mk linux/fs/aufs/conf.mk
--- /usr/share/empty/fs/aufs/conf.mk 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/conf.mk 2015-06-28 17:35:44.348050491 +0200
++++ linux/fs/aufs/conf.mk 2015-09-24 10:47:58.248052907 +0200
@@ -0,0 +1,38 @@
+
+AuConfStr = CONFIG_AUFS_FS=${CONFIG_AUFS_FS}
+-include ${srctree}/${src}/conf_priv.mk
diff -urN /usr/share/empty/fs/aufs/cpup.c linux/fs/aufs/cpup.c
--- /usr/share/empty/fs/aufs/cpup.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/cpup.c 2015-06-28 17:36:09.025073697 +0200
++++ linux/fs/aufs/cpup.c 2015-09-24 10:47:58.248052907 +0200
@@ -0,0 +1,1319 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/cpup.h linux/fs/aufs/cpup.h
--- /usr/share/empty/fs/aufs/cpup.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/cpup.h 2015-06-28 17:35:44.348050491 +0200
++++ linux/fs/aufs/cpup.h 2015-09-24 10:47:58.248052907 +0200
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+#endif /* __AUFS_CPUP_H__ */
diff -urN /usr/share/empty/fs/aufs/dbgaufs.c linux/fs/aufs/dbgaufs.c
--- /usr/share/empty/fs/aufs/dbgaufs.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dbgaufs.c 2015-06-28 17:35:44.348050491 +0200
++++ linux/fs/aufs/dbgaufs.c 2015-09-24 10:47:58.248052907 +0200
@@ -0,0 +1,432 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/dbgaufs.h linux/fs/aufs/dbgaufs.h
--- /usr/share/empty/fs/aufs/dbgaufs.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dbgaufs.h 2015-06-28 17:35:44.348050491 +0200
++++ linux/fs/aufs/dbgaufs.h 2015-09-24 10:47:58.248052907 +0200
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+#endif /* __DBGAUFS_H__ */
diff -urN /usr/share/empty/fs/aufs/dcsub.c linux/fs/aufs/dcsub.c
--- /usr/share/empty/fs/aufs/dcsub.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dcsub.c 2015-06-28 17:35:44.348050491 +0200
++++ linux/fs/aufs/dcsub.c 2015-09-24 10:47:58.248052907 +0200
@@ -0,0 +1,224 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/dcsub.h linux/fs/aufs/dcsub.h
--- /usr/share/empty/fs/aufs/dcsub.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dcsub.h 2015-06-28 17:36:09.025073697 +0200
++++ linux/fs/aufs/dcsub.h 2015-09-24 10:47:58.251386326 +0200
@@ -0,0 +1,136 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+#endif /* __AUFS_DCSUB_H__ */
diff -urN /usr/share/empty/fs/aufs/debug.c linux/fs/aufs/debug.c
--- /usr/share/empty/fs/aufs/debug.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/debug.c 2015-06-28 17:36:09.025073697 +0200
++++ linux/fs/aufs/debug.c 2015-09-24 10:47:58.251386326 +0200
@@ -0,0 +1,440 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/debug.h linux/fs/aufs/debug.h
--- /usr/share/empty/fs/aufs/debug.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/debug.h 2015-06-28 17:35:44.348050491 +0200
++++ linux/fs/aufs/debug.h 2015-09-24 10:47:58.251386326 +0200
@@ -0,0 +1,225 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+#endif /* __AUFS_DEBUG_H__ */
diff -urN /usr/share/empty/fs/aufs/dentry.c linux/fs/aufs/dentry.c
--- /usr/share/empty/fs/aufs/dentry.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dentry.c 2015-06-28 17:36:09.025073697 +0200
++++ linux/fs/aufs/dentry.c 2015-09-24 10:47:58.251386326 +0200
@@ -0,0 +1,1105 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+};
diff -urN /usr/share/empty/fs/aufs/dentry.h linux/fs/aufs/dentry.h
--- /usr/share/empty/fs/aufs/dentry.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dentry.h 2015-06-28 17:35:44.348050491 +0200
++++ linux/fs/aufs/dentry.h 2015-09-24 10:47:58.251386326 +0200
@@ -0,0 +1,233 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+#endif /* __AUFS_DENTRY_H__ */
diff -urN /usr/share/empty/fs/aufs/dinfo.c linux/fs/aufs/dinfo.c
--- /usr/share/empty/fs/aufs/dinfo.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dinfo.c 2015-06-28 17:36:09.025073697 +0200
++++ linux/fs/aufs/dinfo.c 2015-09-24 10:47:58.251386326 +0200
@@ -0,0 +1,550 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/dir.c linux/fs/aufs/dir.c
--- /usr/share/empty/fs/aufs/dir.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dir.c 2015-06-28 17:36:09.025073697 +0200
++++ linux/fs/aufs/dir.c 2015-09-24 10:47:58.251386326 +0200
@@ -0,0 +1,753 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+};
diff -urN /usr/share/empty/fs/aufs/dir.h linux/fs/aufs/dir.h
--- /usr/share/empty/fs/aufs/dir.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dir.h 2015-06-28 17:35:44.348050491 +0200
++++ linux/fs/aufs/dir.h 2015-09-24 10:47:58.251386326 +0200
@@ -0,0 +1,131 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+#endif /* __AUFS_DIR_H__ */
diff -urN /usr/share/empty/fs/aufs/dynop.c linux/fs/aufs/dynop.c
--- /usr/share/empty/fs/aufs/dynop.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dynop.c 2015-06-28 17:35:44.348050491 +0200
++++ linux/fs/aufs/dynop.c 2015-09-24 10:47:58.251386326 +0200
@@ -0,0 +1,369 @@
+/*
+ * Copyright (C) 2010-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/dynop.h linux/fs/aufs/dynop.h
--- /usr/share/empty/fs/aufs/dynop.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/dynop.h 2015-06-28 17:35:44.348050491 +0200
++++ linux/fs/aufs/dynop.h 2015-09-24 10:47:58.251386326 +0200
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2010-2015 Junjiro R. Okajima
+#endif /* __AUFS_DYNOP_H__ */
diff -urN /usr/share/empty/fs/aufs/export.c linux/fs/aufs/export.c
--- /usr/share/empty/fs/aufs/export.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/export.c 2015-06-28 17:36:09.025073697 +0200
++++ linux/fs/aufs/export.c 2015-09-24 10:47:58.251386326 +0200
@@ -0,0 +1,832 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/fhsm.c linux/fs/aufs/fhsm.c
--- /usr/share/empty/fs/aufs/fhsm.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/fhsm.c 2015-06-28 17:35:44.348050491 +0200
++++ linux/fs/aufs/fhsm.c 2015-09-24 10:47:58.251386326 +0200
@@ -0,0 +1,426 @@
+/*
+ * Copyright (C) 2011-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/file.c linux/fs/aufs/file.c
--- /usr/share/empty/fs/aufs/file.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/file.c 2015-06-28 17:36:09.025073697 +0200
++++ linux/fs/aufs/file.c 2015-09-24 10:47:58.251386326 +0200
@@ -0,0 +1,841 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+};
diff -urN /usr/share/empty/fs/aufs/file.h linux/fs/aufs/file.h
--- /usr/share/empty/fs/aufs/file.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/file.h 2015-06-28 17:35:44.348050491 +0200
++++ linux/fs/aufs/file.h 2015-09-24 10:47:58.251386326 +0200
@@ -0,0 +1,291 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+#endif /* __AUFS_FILE_H__ */
diff -urN /usr/share/empty/fs/aufs/finfo.c linux/fs/aufs/finfo.c
--- /usr/share/empty/fs/aufs/finfo.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/finfo.c 2015-06-28 17:35:44.348050491 +0200
++++ linux/fs/aufs/finfo.c 2015-09-24 10:47:58.251386326 +0200
@@ -0,0 +1,157 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/f_op.c linux/fs/aufs/f_op.c
--- /usr/share/empty/fs/aufs/f_op.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/f_op.c 2015-06-28 17:36:09.025073697 +0200
++++ linux/fs/aufs/f_op.c 2015-09-24 10:47:58.251386326 +0200
@@ -0,0 +1,738 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+};
diff -urN /usr/share/empty/fs/aufs/fstype.h linux/fs/aufs/fstype.h
--- /usr/share/empty/fs/aufs/fstype.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/fstype.h 2015-06-28 17:35:44.348050491 +0200
++++ linux/fs/aufs/fstype.h 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,400 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+#endif /* __AUFS_FSTYPE_H__ */
diff -urN /usr/share/empty/fs/aufs/hfsnotify.c linux/fs/aufs/hfsnotify.c
--- /usr/share/empty/fs/aufs/hfsnotify.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hfsnotify.c 2015-06-28 17:35:44.348050491 +0200
++++ linux/fs/aufs/hfsnotify.c 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,288 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+};
diff -urN /usr/share/empty/fs/aufs/hfsplus.c linux/fs/aufs/hfsplus.c
--- /usr/share/empty/fs/aufs/hfsplus.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hfsplus.c 2015-06-28 17:36:09.025073697 +0200
++++ linux/fs/aufs/hfsplus.c 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,56 @@
+/*
+ * Copyright (C) 2010-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/hnotify.c linux/fs/aufs/hnotify.c
--- /usr/share/empty/fs/aufs/hnotify.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/hnotify.c 2015-06-28 17:36:09.025073697 +0200
++++ linux/fs/aufs/hnotify.c 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,710 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/iinfo.c linux/fs/aufs/iinfo.c
--- /usr/share/empty/fs/aufs/iinfo.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/iinfo.c 2015-06-28 17:35:44.348050491 +0200
++++ linux/fs/aufs/iinfo.c 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,277 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/inode.c linux/fs/aufs/inode.c
--- /usr/share/empty/fs/aufs/inode.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/inode.c 2015-06-28 17:36:09.025073697 +0200
++++ linux/fs/aufs/inode.c 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,500 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/inode.h linux/fs/aufs/inode.h
--- /usr/share/empty/fs/aufs/inode.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/inode.h 2015-06-28 17:35:44.348050491 +0200
++++ linux/fs/aufs/inode.h 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,673 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+#endif /* __AUFS_INODE_H__ */
diff -urN /usr/share/empty/fs/aufs/ioctl.c linux/fs/aufs/ioctl.c
--- /usr/share/empty/fs/aufs/ioctl.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/ioctl.c 2015-06-28 17:35:44.348050491 +0200
++++ linux/fs/aufs/ioctl.c 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,219 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+#endif
diff -urN /usr/share/empty/fs/aufs/i_op_add.c linux/fs/aufs/i_op_add.c
--- /usr/share/empty/fs/aufs/i_op_add.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_add.c 2015-06-28 17:36:09.025073697 +0200
++++ linux/fs/aufs/i_op_add.c 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,932 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/i_op.c linux/fs/aufs/i_op.c
--- /usr/share/empty/fs/aufs/i_op.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op.c 2015-06-28 17:36:09.025073697 +0200
-@@ -0,0 +1,1447 @@
++++ linux/fs/aufs/i_op.c 2015-09-24 10:47:58.254719746 +0200
+@@ -0,0 +1,1483 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+ *
+
+/* ---------------------------------------------------------------------- */
+
-+static int h_readlink(struct dentry *dentry, int bindex, char __user *buf,
-+ int bufsiz)
-+{
-+ int err;
-+ struct super_block *sb;
-+ struct dentry *h_dentry;
-+ struct inode *inode, *h_inode;
++/*
++ * Assumption:
++ * - the number of symlinks is not so many.
++ *
++ * Structure:
++ * - sbinfo (instead of iinfo) contains an hlist of struct au_symlink.
++ * If iinfo contained the hlist, then it would be rather large waste of memory
++ * I am afraid.
++ * - struct au_symlink contains the necessary info for h_inode follow_link() and
++ * put_link().
++ */
+
-+ err = -EINVAL;
-+ h_dentry = au_h_dptr(dentry, bindex);
-+ h_inode = d_inode(h_dentry);
-+ if (unlikely(!h_inode->i_op->readlink))
-+ goto out;
++struct au_symlink {
++ union {
++ struct hlist_node hlist;
++ struct rcu_head rcu;
++ };
+
-+ err = security_inode_readlink(h_dentry);
-+ if (unlikely(err))
-+ goto out;
++ struct inode *h_inode;
++ void *h_cookie;
++};
+
-+ sb = dentry->d_sb;
-+ inode = d_inode(dentry);
-+ if (!au_test_ro(sb, bindex, inode)) {
-+ vfsub_touch_atime(au_sbr_mnt(sb, bindex), h_dentry);
-+ fsstack_copy_attr_atime(inode, h_inode);
-+ }
-+ err = h_inode->i_op->readlink(h_dentry, buf, bufsiz);
++static void au_symlink_add(struct super_block *sb, struct au_symlink *slink,
++ struct inode *h_inode, void *cookie)
++{
++ struct au_sbinfo *sbinfo;
+
-+out:
-+ return err;
++ ihold(h_inode);
++ slink->h_inode = h_inode;
++ slink->h_cookie = cookie;
++ sbinfo = au_sbi(sb);
++ au_sphl_add(&slink->hlist, &sbinfo->si_symlink);
+}
+
-+static int aufs_readlink(struct dentry *dentry, char __user *buf, int bufsiz)
++static void au_symlink_del(struct super_block *sb, struct au_symlink *slink)
+{
-+ int err;
-+
-+ err = aufs_read_lock(dentry, AuLock_IR | AuLock_GEN);
-+ if (unlikely(err))
-+ goto out;
-+ err = au_d_hashed_positive(dentry);
-+ if (!err)
-+ err = h_readlink(dentry, au_dbstart(dentry), buf, bufsiz);
-+ aufs_read_unlock(dentry, AuLock_IR);
++ struct au_sbinfo *sbinfo;
+
-+out:
-+ return err;
++ /* do not iput() within rcu */
++ iput(slink->h_inode);
++ slink->h_inode = NULL;
++ sbinfo = au_sbi(sb);
++ au_sphl_del_rcu(&slink->hlist, &sbinfo->si_symlink);
++ kfree_rcu(slink, rcu);
+}
+
-+static void *aufs_follow_link(struct dentry *dentry, struct nameidata *nd)
++static const char *aufs_follow_link(struct dentry *dentry, void **cookie)
+{
++ const char *ret;
++ struct inode *inode, *h_inode;
++ struct dentry *h_dentry;
++ struct au_symlink *slink;
+ int err;
-+ mm_segment_t old_fs;
-+ union {
-+ char *k;
-+ char __user *u;
-+ } buf;
-+
-+ err = -ENOMEM;
-+ buf.k = (void *)__get_free_page(GFP_NOFS);
-+ if (unlikely(!buf.k))
-+ goto out;
++ aufs_bindex_t bindex;
+
++ ret = NULL; /* supress a warning */
+ err = aufs_read_lock(dentry, AuLock_IR | AuLock_GEN);
+ if (unlikely(err))
-+ goto out_name;
++ goto out;
+
+ err = au_d_hashed_positive(dentry);
-+ if (!err) {
-+ old_fs = get_fs();
-+ set_fs(KERNEL_DS);
-+ err = h_readlink(dentry, au_dbstart(dentry), buf.u, PATH_MAX);
-+ set_fs(old_fs);
++ if (unlikely(err))
++ goto out_unlock;
++
++ err = -EINVAL;
++ inode = d_inode(dentry);
++ bindex = au_ibstart(inode);
++ h_inode = au_h_iptr(inode, bindex);
++ if (unlikely(!h_inode->i_op->follow_link))
++ goto out_unlock;
++
++ err = -ENOMEM;
++ slink = kmalloc(sizeof(*slink), GFP_NOFS);
++ if (unlikely(!slink))
++ goto out_unlock;
++
++ err = -EBUSY;
++ h_dentry = NULL;
++ if (au_dbstart(dentry) <= bindex) {
++ h_dentry = au_h_dptr(dentry, bindex);
++ if (h_dentry)
++ dget(h_dentry);
+ }
-+ aufs_read_unlock(dentry, AuLock_IR);
++ if (!h_dentry) {
++ h_dentry = d_find_any_alias(h_inode);
++ if (IS_ERR(h_dentry)) {
++ err = PTR_ERR(h_dentry);
++ goto out_free;
++ }
++ }
++ if (unlikely(!h_dentry))
++ goto out_free;
+
-+ if (err >= 0) {
-+ buf.k[err] = 0;
-+ /* will be freed by put_link */
-+ nd_set_link(nd, buf.k);
-+ return NULL; /* success */
++ err = 0;
++ AuDbg("%pf\n", h_inode->i_op->follow_link);
++ AuDbgDentry(h_dentry);
++ ret = h_inode->i_op->follow_link(h_dentry, cookie);
++ dput(h_dentry);
++
++ if (!IS_ERR_OR_NULL(ret)) {
++ au_symlink_add(inode->i_sb, slink, h_inode, *cookie);
++ *cookie = slink;
++ AuDbg("slink %p\n", slink);
++ goto out_unlock; /* success */
+ }
+
-+out_name:
-+ free_page((unsigned long)buf.k);
++out_free:
++ slink->h_inode = NULL;
++ kfree_rcu(slink, rcu);
++out_unlock:
++ aufs_read_unlock(dentry, AuLock_IR);
+out:
-+ AuTraceErr(err);
-+ return ERR_PTR(err);
++ if (unlikely(err))
++ ret = ERR_PTR(err);
++ AuTraceErrPtr(ret);
++ return ret;
+}
+
-+static void aufs_put_link(struct dentry *dentry __maybe_unused,
-+ struct nameidata *nd, void *cookie __maybe_unused)
++static void aufs_put_link(struct inode *inode, void *cookie)
+{
-+ char *p;
++ struct au_symlink *slink;
++ struct inode *h_inode;
+
-+ p = nd_get_link(nd);
-+ if (!IS_ERR_OR_NULL(p))
-+ free_page((unsigned long)p);
++ slink = cookie;
++ AuDbg("slink %p\n", slink);
++ h_inode = slink->h_inode;
++ AuDbg("%pf\n", h_inode->i_op->put_link);
++ AuDbgInode(h_inode);
++ if (h_inode->i_op->put_link)
++ h_inode->i_op->put_link(h_inode, slink->h_cookie);
++ au_symlink_del(inode->i_sb, slink);
+}
+
+/* ---------------------------------------------------------------------- */
+ .removexattr = aufs_removexattr,
+#endif
+
-+ .readlink = aufs_readlink,
++ .readlink = generic_readlink,
+ .follow_link = aufs_follow_link,
+ .put_link = aufs_put_link,
+
+};
diff -urN /usr/share/empty/fs/aufs/i_op_del.c linux/fs/aufs/i_op_del.c
--- /usr/share/empty/fs/aufs/i_op_del.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_del.c 2015-06-28 17:36:09.025073697 +0200
++++ linux/fs/aufs/i_op_del.c 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,510 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/i_op_ren.c linux/fs/aufs/i_op_ren.c
--- /usr/share/empty/fs/aufs/i_op_ren.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/i_op_ren.c 2015-06-28 17:36:09.025073697 +0200
++++ linux/fs/aufs/i_op_ren.c 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,1017 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/Kconfig linux/fs/aufs/Kconfig
--- /usr/share/empty/fs/aufs/Kconfig 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/Kconfig 2015-06-28 17:35:44.344717109 +0200
++++ linux/fs/aufs/Kconfig 2015-09-24 10:47:58.248052907 +0200
@@ -0,0 +1,185 @@
+config AUFS_FS
+ tristate "Aufs (Advanced multi layered unification filesystem) support"
+endif
diff -urN /usr/share/empty/fs/aufs/loop.c linux/fs/aufs/loop.c
--- /usr/share/empty/fs/aufs/loop.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/loop.c 2015-06-28 17:35:44.348050491 +0200
++++ linux/fs/aufs/loop.c 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,145 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/loop.h linux/fs/aufs/loop.h
--- /usr/share/empty/fs/aufs/loop.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/loop.h 2015-06-28 17:35:44.348050491 +0200
++++ linux/fs/aufs/loop.h 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+#endif /* __AUFS_LOOP_H__ */
diff -urN /usr/share/empty/fs/aufs/magic.mk linux/fs/aufs/magic.mk
--- /usr/share/empty/fs/aufs/magic.mk 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/magic.mk 2015-06-28 17:35:44.348050491 +0200
++++ linux/fs/aufs/magic.mk 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,30 @@
+
+# defined in ${srctree}/fs/fuse/inode.c
+endif
diff -urN /usr/share/empty/fs/aufs/Makefile linux/fs/aufs/Makefile
--- /usr/share/empty/fs/aufs/Makefile 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/Makefile 2015-06-28 17:35:44.344717109 +0200
++++ linux/fs/aufs/Makefile 2015-09-24 10:47:58.248052907 +0200
@@ -0,0 +1,44 @@
+
+include ${src}/magic.mk
+aufs-$(CONFIG_AUFS_MAGIC_SYSRQ) += sysrq.o
diff -urN /usr/share/empty/fs/aufs/module.c linux/fs/aufs/module.c
--- /usr/share/empty/fs/aufs/module.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/module.c 2015-06-28 17:35:44.348050491 +0200
++++ linux/fs/aufs/module.c 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,210 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+module_exit(aufs_exit);
diff -urN /usr/share/empty/fs/aufs/module.h linux/fs/aufs/module.h
--- /usr/share/empty/fs/aufs/module.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/module.h 2015-06-28 17:35:44.348050491 +0200
++++ linux/fs/aufs/module.h 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+#endif /* __AUFS_MODULE_H__ */
diff -urN /usr/share/empty/fs/aufs/mvdown.c linux/fs/aufs/mvdown.c
--- /usr/share/empty/fs/aufs/mvdown.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/mvdown.c 2015-06-28 17:36:09.025073697 +0200
++++ linux/fs/aufs/mvdown.c 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,694 @@
+/*
+ * Copyright (C) 2011-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/opts.c linux/fs/aufs/opts.c
--- /usr/share/empty/fs/aufs/opts.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/opts.c 2015-06-28 17:36:09.028407078 +0200
++++ linux/fs/aufs/opts.c 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,1835 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/opts.h linux/fs/aufs/opts.h
--- /usr/share/empty/fs/aufs/opts.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/opts.h 2015-06-28 17:35:44.351383872 +0200
++++ linux/fs/aufs/opts.h 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,210 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+#endif /* __AUFS_OPTS_H__ */
diff -urN /usr/share/empty/fs/aufs/plink.c linux/fs/aufs/plink.c
--- /usr/share/empty/fs/aufs/plink.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/plink.c 2015-06-28 17:36:09.028407078 +0200
++++ linux/fs/aufs/plink.c 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,528 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/poll.c linux/fs/aufs/poll.c
--- /usr/share/empty/fs/aufs/poll.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/poll.c 2015-06-28 17:35:44.351383872 +0200
++++ linux/fs/aufs/poll.c 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/posix_acl.c linux/fs/aufs/posix_acl.c
--- /usr/share/empty/fs/aufs/posix_acl.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/posix_acl.c 2015-06-28 17:35:44.351383872 +0200
++++ linux/fs/aufs/posix_acl.c 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,99 @@
+/*
+ * Copyright (C) 2014-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/procfs.c linux/fs/aufs/procfs.c
--- /usr/share/empty/fs/aufs/procfs.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/procfs.c 2015-06-28 17:35:44.351383872 +0200
++++ linux/fs/aufs/procfs.c 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,169 @@
+/*
+ * Copyright (C) 2010-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/rdu.c linux/fs/aufs/rdu.c
--- /usr/share/empty/fs/aufs/rdu.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/rdu.c 2015-06-28 17:36:09.028407078 +0200
++++ linux/fs/aufs/rdu.c 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,388 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+#endif
diff -urN /usr/share/empty/fs/aufs/rwsem.h linux/fs/aufs/rwsem.h
--- /usr/share/empty/fs/aufs/rwsem.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/rwsem.h 2015-06-28 17:35:44.351383872 +0200
++++ linux/fs/aufs/rwsem.h 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,191 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+#endif /* __AUFS_RWSEM_H__ */
diff -urN /usr/share/empty/fs/aufs/sbinfo.c linux/fs/aufs/sbinfo.c
--- /usr/share/empty/fs/aufs/sbinfo.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sbinfo.c 2015-06-28 17:36:09.028407078 +0200
-@@ -0,0 +1,356 @@
++++ linux/fs/aufs/sbinfo.c 2015-09-24 10:47:58.254719746 +0200
+@@ -0,0 +1,360 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+ *
+ AuDebugOn(!hlist_empty(&sbinfo->si_plink[i].head));
+ AuDebugOn(atomic_read(&sbinfo->si_nowait.nw_len));
+
++ AuDebugOn(!hlist_empty(&sbinfo->si_symlink.head));
++
+ au_rw_write_lock(&sbinfo->si_rwsem);
+ au_br_free(sbinfo);
+ au_rw_write_unlock(&sbinfo->si_rwsem);
+
+ sbinfo->si_mntflags = au_opts_plink(AuOpt_Def);
+
++ au_sphl_init(&sbinfo->si_symlink);
++
+ sbinfo->si_xino_jiffy = jiffies;
+ sbinfo->si_xino_expire
+ = msecs_to_jiffies(AUFS_XINO_DEF_SEC * MSEC_PER_SEC);
+}
diff -urN /usr/share/empty/fs/aufs/spl.h linux/fs/aufs/spl.h
--- /usr/share/empty/fs/aufs/spl.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/spl.h 2015-06-28 17:35:44.351383872 +0200
++++ linux/fs/aufs/spl.h 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,111 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+#endif /* __AUFS_SPL_H__ */
diff -urN /usr/share/empty/fs/aufs/super.c linux/fs/aufs/super.c
--- /usr/share/empty/fs/aufs/super.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/super.c 2015-06-28 17:36:09.028407078 +0200
++++ linux/fs/aufs/super.c 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,1004 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+};
diff -urN /usr/share/empty/fs/aufs/super.h linux/fs/aufs/super.h
--- /usr/share/empty/fs/aufs/super.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/super.h 2015-06-28 17:36:09.028407078 +0200
-@@ -0,0 +1,635 @@
++++ linux/fs/aufs/super.h 2015-09-24 10:47:58.254719746 +0200
+@@ -0,0 +1,638 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+ *
+ /* include/asm-ia64/siginfo.h defines a macro named si_flags */
+ unsigned int si_mntflags;
+
++ /* symlink to follow_link() and put_link() */
++ struct au_sphlhead si_symlink;
++
+ /* external inode number (bitmap and translation table) */
+ vfs_readf_t si_xread;
+ vfs_writef_t si_xwrite;
+#endif /* __AUFS_SUPER_H__ */
diff -urN /usr/share/empty/fs/aufs/sysaufs.c linux/fs/aufs/sysaufs.c
--- /usr/share/empty/fs/aufs/sysaufs.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysaufs.c 2015-06-28 17:35:44.351383872 +0200
++++ linux/fs/aufs/sysaufs.c 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,104 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/sysaufs.h linux/fs/aufs/sysaufs.h
--- /usr/share/empty/fs/aufs/sysaufs.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysaufs.h 2015-06-28 17:35:44.351383872 +0200
++++ linux/fs/aufs/sysaufs.h 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+#endif /* __SYSAUFS_H__ */
diff -urN /usr/share/empty/fs/aufs/sysfs.c linux/fs/aufs/sysfs.c
--- /usr/share/empty/fs/aufs/sysfs.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysfs.c 2015-06-28 17:35:44.351383872 +0200
++++ linux/fs/aufs/sysfs.c 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,372 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/sysrq.c linux/fs/aufs/sysrq.c
--- /usr/share/empty/fs/aufs/sysrq.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/sysrq.c 2015-06-28 17:36:09.028407078 +0200
++++ linux/fs/aufs/sysrq.c 2015-09-24 10:47:58.254719746 +0200
@@ -0,0 +1,157 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/vdir.c linux/fs/aufs/vdir.c
--- /usr/share/empty/fs/aufs/vdir.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/vdir.c 2015-06-28 17:35:44.351383872 +0200
++++ linux/fs/aufs/vdir.c 2015-09-24 10:47:58.258053165 +0200
@@ -0,0 +1,888 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/vfsub.c linux/fs/aufs/vfsub.c
--- /usr/share/empty/fs/aufs/vfsub.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/vfsub.c 2015-06-28 17:36:09.028407078 +0200
++++ linux/fs/aufs/vfsub.c 2015-09-24 10:47:58.258053165 +0200
@@ -0,0 +1,848 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/vfsub.h linux/fs/aufs/vfsub.h
--- /usr/share/empty/fs/aufs/vfsub.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/vfsub.h 2015-06-28 17:35:44.351383872 +0200
++++ linux/fs/aufs/vfsub.h 2015-09-24 10:47:58.258053165 +0200
@@ -0,0 +1,286 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+#endif /* __AUFS_VFSUB_H__ */
diff -urN /usr/share/empty/fs/aufs/wbr_policy.c linux/fs/aufs/wbr_policy.c
--- /usr/share/empty/fs/aufs/wbr_policy.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/wbr_policy.c 2015-06-28 17:36:09.028407078 +0200
++++ linux/fs/aufs/wbr_policy.c 2015-09-24 10:47:58.258053165 +0200
@@ -0,0 +1,765 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+};
diff -urN /usr/share/empty/fs/aufs/whout.c linux/fs/aufs/whout.c
--- /usr/share/empty/fs/aufs/whout.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/whout.c 2015-06-28 17:36:09.028407078 +0200
++++ linux/fs/aufs/whout.c 2015-09-24 10:47:58.258053165 +0200
@@ -0,0 +1,1063 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/whout.h linux/fs/aufs/whout.h
--- /usr/share/empty/fs/aufs/whout.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/whout.h 2015-06-28 17:35:44.351383872 +0200
++++ linux/fs/aufs/whout.h 2015-09-24 10:47:58.258053165 +0200
@@ -0,0 +1,85 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+#endif /* __AUFS_WHOUT_H__ */
diff -urN /usr/share/empty/fs/aufs/wkq.c linux/fs/aufs/wkq.c
--- /usr/share/empty/fs/aufs/wkq.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/wkq.c 2015-06-28 17:35:44.351383872 +0200
++++ linux/fs/aufs/wkq.c 2015-09-24 10:47:58.258053165 +0200
@@ -0,0 +1,213 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/fs/aufs/wkq.h linux/fs/aufs/wkq.h
--- /usr/share/empty/fs/aufs/wkq.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/wkq.h 2015-06-28 17:35:44.351383872 +0200
++++ linux/fs/aufs/wkq.h 2015-09-24 10:47:58.258053165 +0200
@@ -0,0 +1,91 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+#endif /* __AUFS_WKQ_H__ */
diff -urN /usr/share/empty/fs/aufs/xattr.c linux/fs/aufs/xattr.c
--- /usr/share/empty/fs/aufs/xattr.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/xattr.c 2015-06-28 17:36:09.028407078 +0200
++++ linux/fs/aufs/xattr.c 2015-09-24 10:47:58.258053165 +0200
@@ -0,0 +1,344 @@
+/*
+ * Copyright (C) 2014-2015 Junjiro R. Okajima
+#endif
diff -urN /usr/share/empty/fs/aufs/xino.c linux/fs/aufs/xino.c
--- /usr/share/empty/fs/aufs/xino.c 1970-01-01 01:00:00.000000000 +0100
-+++ linux/fs/aufs/xino.c 2015-06-28 17:36:09.028407078 +0200
++++ linux/fs/aufs/xino.c 2015-09-24 10:47:58.258053165 +0200
@@ -0,0 +1,1297 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+}
diff -urN /usr/share/empty/include/uapi/linux/aufs_type.h linux/include/uapi/linux/aufs_type.h
--- /usr/share/empty/include/uapi/linux/aufs_type.h 1970-01-01 01:00:00.000000000 +0100
-+++ linux/include/uapi/linux/aufs_type.h 2015-06-28 17:36:09.028407078 +0200
++++ linux/include/uapi/linux/aufs_type.h 2015-09-24 10:47:58.258053165 +0200
@@ -0,0 +1,419 @@
+/*
+ * Copyright (C) 2005-2015 Junjiro R. Okajima
+
+#include <linux/limits.h>
+
-+#define AUFS_VERSION "4.x-rcN-20150622"
++#define AUFS_VERSION "4.x-rcN-20150921"
+
+/* todo? move this to linux-2.6.19/include/magic.h */
+#define AUFS_SUPER_MAGIC ('a' << 24 | 'u' << 16 | 'f' << 8 | 's')
aufs4.x-rcN loopback patch
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
-index 0160952..866f8e2 100644
+index 23103ad..5c3263f 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
-@@ -419,7 +419,7 @@ static int do_req_filebacked(struct loop_device *lo, struct request *rq)
+@@ -417,7 +417,7 @@ static int do_req_filebacked(struct loop_device *lo, struct request *rq)
}
struct switch_request {
struct completion wait;
};
-@@ -439,6 +439,7 @@ static void do_loop_switch(struct loop_device *lo, struct switch_request *p)
+@@ -437,6 +437,7 @@ static void do_loop_switch(struct loop_device *lo, struct switch_request *p)
mapping = file->f_mapping;
mapping_set_gfp_mask(old_file->f_mapping, lo->old_gfp_mask);
lo->lo_backing_file = file;
lo->lo_blocksize = S_ISBLK(mapping->host->i_mode) ?
mapping->host->i_bdev->bd_block_size : PAGE_SIZE;
lo->old_gfp_mask = mapping_gfp_mask(mapping);
-@@ -450,11 +451,13 @@ static void do_loop_switch(struct loop_device *lo, struct switch_request *p)
+@@ -448,11 +449,13 @@ static void do_loop_switch(struct loop_device *lo, struct switch_request *p)
* First it needs to flush existing IO, it does this by sending a magic
* BIO down the pipe. The completion of this BIO does the actual switch.
*/
/* freeze queue and wait for completion of scheduled requests */
blk_mq_freeze_queue(lo->lo_queue);
-@@ -473,7 +476,16 @@ static int loop_switch(struct loop_device *lo, struct file *file)
+@@ -471,7 +474,16 @@ static int loop_switch(struct loop_device *lo, struct file *file)
*/
static int loop_flush(struct loop_device *lo)
{
+ return f;
}
- /*
-@@ -488,6 +500,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
+ static void loop_reread_partitions(struct loop_device *lo,
+@@ -508,6 +520,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
unsigned int arg)
{
struct file *file, *old_file;
struct inode *inode;
int error;
-@@ -504,9 +517,16 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
+@@ -524,9 +537,16 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
file = fget(arg);
if (!file)
goto out;
error = -EINVAL;
-@@ -518,17 +538,21 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
+@@ -538,17 +558,21 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
goto out_putf;
/* and ... switch */
+ if (old_virt_file)
+ fput(old_virt_file);
if (lo->lo_flags & LO_FLAGS_PARTSCAN)
- ioctl_by_bdev(bdev, BLKRRPART, 0);
+ loop_reread_partitions(lo, bdev);
return 0;
out_putf:
out:
return error;
}
-@@ -689,7 +713,7 @@ static void loop_config_discard(struct loop_device *lo)
+@@ -709,7 +733,7 @@ static void loop_config_discard(struct loop_device *lo)
static int loop_set_fd(struct loop_device *lo, fmode_t mode,
struct block_device *bdev, unsigned int arg)
{
struct inode *inode;
struct address_space *mapping;
unsigned lo_blocksize;
-@@ -704,6 +728,12 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
+@@ -724,6 +748,12 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
file = fget(arg);
if (!file)
goto out;
error = -EBUSY;
if (lo->lo_state != Lo_unbound)
-@@ -752,6 +782,7 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
+@@ -778,6 +808,7 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
lo->lo_device = bdev;
lo->lo_flags = lo_flags;
lo->lo_backing_file = file;
lo->transfer = NULL;
lo->ioctl = NULL;
lo->lo_sizelimit = 0;
-@@ -783,6 +814,8 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
+@@ -809,6 +840,8 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
out_putf:
fput(file);
out:
/* This is safe: open() is still holding a reference. */
module_put(THIS_MODULE);
-@@ -829,6 +862,7 @@ loop_init_xfer(struct loop_device *lo, struct loop_func_table *xfer,
+@@ -855,6 +888,7 @@ loop_init_xfer(struct loop_device *lo, struct loop_func_table *xfer,
static int loop_clr_fd(struct loop_device *lo)
{
struct file *filp = lo->lo_backing_file;
gfp_t gfp = lo->old_gfp_mask;
struct block_device *bdev = lo->lo_device;
-@@ -857,6 +891,7 @@ static int loop_clr_fd(struct loop_device *lo)
+@@ -886,6 +920,7 @@ static int loop_clr_fd(struct loop_device *lo)
spin_lock_irq(&lo->lo_lock);
lo->lo_state = Lo_rundown;
lo->lo_backing_file = NULL;
spin_unlock_irq(&lo->lo_lock);
loop_release_xfer(lo);
-@@ -898,6 +933,8 @@ static int loop_clr_fd(struct loop_device *lo)
+@@ -931,6 +966,8 @@ static int loop_clr_fd(struct loop_device *lo)
* bd_mutex which is usually taken before lo_ctl_mutex.
*/
fput(filp);
}
diff --git a/drivers/block/loop.h b/drivers/block/loop.h
-index 301c27f..df84aa0 100644
+index 25e8997..93b6fce 100644
--- a/drivers/block/loop.h
+++ b/drivers/block/loop.h
@@ -46,7 +46,7 @@ struct loop_device {
/* ---------------------------------------------------------------------- */
diff --git a/include/linux/fs.h b/include/linux/fs.h
-index 3229f97..f63cc0d 100644
+index 86080ea..5f8e0f2 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
-@@ -1696,6 +1696,10 @@ struct super_operations {
+@@ -1708,6 +1708,10 @@ struct super_operations {
struct shrink_control *);
long (*free_cached_objects)(struct super_block *,
struct shrink_control *);