importing all available aufs patches to git for linux 3.4

This commit is contained in:
abveritas 2012-06-04 20:19:00 +00:00
parent fdd7acfde3
commit f17e963be5
9 changed files with 31379 additions and 475 deletions

70
linux/aufs3-base.patch Normal file
View File

@ -0,0 +1,70 @@
aufs3 base patch
diff --git a/fs/namei.c b/fs/namei.c
index 5008f01..4cc94cf 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1753,7 +1753,7 @@ static struct dentry *__lookup_hash(struct qstr *name,
* needs parent already locked. Doesn't follow mounts.
* SMP-safe.
*/
-static struct dentry *lookup_hash(struct nameidata *nd)
+struct dentry *lookup_hash(struct nameidata *nd)
{
return __lookup_hash(&nd->last, nd->path.dentry, nd);
}
diff --git a/fs/splice.c b/fs/splice.c
index fa2defa..e3569b0 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1085,8 +1085,8 @@ EXPORT_SYMBOL(generic_splice_sendpage);
/*
* Attempt to initiate a splice from pipe to file.
*/
-static long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
- loff_t *ppos, size_t len, unsigned int flags)
+long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+ loff_t *ppos, size_t len, unsigned int flags)
{
ssize_t (*splice_write)(struct pipe_inode_info *, struct file *,
loff_t *, size_t, unsigned int);
@@ -1113,9 +1113,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 long do_splice_to(struct file *in, loff_t *ppos,
- struct pipe_inode_info *pipe, size_t len,
- unsigned int flags)
+long do_splice_to(struct file *in, loff_t *ppos,
+ struct pipe_inode_info *pipe, size_t len,
+ unsigned int flags)
{
ssize_t (*splice_read)(struct file *, loff_t *,
struct pipe_inode_info *, size_t, unsigned int);
diff --git a/include/linux/namei.h b/include/linux/namei.h
index ffc0213..ef35a31 100644
--- a/include/linux/namei.h
+++ b/include/linux/namei.h
@@ -85,6 +85,7 @@ extern int vfs_path_lookup(struct dentry *, struct vfsmount *,
extern struct file *lookup_instantiate_filp(struct nameidata *nd, struct dentry *dentry,
int (*open)(struct inode *, struct file *));
+extern struct dentry *lookup_hash(struct nameidata *nd);
extern struct dentry *lookup_one_len(const char *, struct dentry *, int);
extern int follow_down_one(struct path *);
diff --git a/include/linux/splice.h b/include/linux/splice.h
index 26e5b61..3ffef2f 100644
--- a/include/linux/splice.h
+++ b/include/linux/splice.h
@@ -91,4 +91,10 @@ extern void splice_shrink_spd(struct pipe_inode_info *,
extern void spd_release_page(struct splice_pipe_desc *, unsigned int);
extern const struct pipe_buf_operations page_cache_pipe_buf_ops;
+
+extern long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
+ loff_t *ppos, size_t len, unsigned int flags);
+extern long do_splice_to(struct file *in, loff_t *ppos,
+ struct pipe_inode_info *pipe, size_t len,
+ unsigned int flags);
#endif

View File

@ -0,0 +1,10 @@
--- a/security/device_cgroup.c
+++ b/security/device_cgroup.c
@@ -13,6 +13,7 @@
#include <linux/slab.h>
#include <linux/rcupdate.h>
#include <linux/mutex.h>
+#include <linux/export.h>
#define ACC_MKNOD 1
#define ACC_READ 2

35
linux/aufs3-kbuild.patch Normal file
View File

@ -0,0 +1,35 @@
aufs3 kbuild patch
diff --git a/fs/Kconfig b/fs/Kconfig
index 5f4c45d..357a8a6 100644
--- a/fs/Kconfig
+++ b/fs/Kconfig
@@ -215,6 +215,7 @@ source "fs/pstore/Kconfig"
source "fs/sysv/Kconfig"
source "fs/ufs/Kconfig"
source "fs/exofs/Kconfig"
+source "fs/aufs/Kconfig"
endif # MISC_FILESYSTEMS
diff --git a/fs/Makefile b/fs/Makefile
index d2c3353..680ad8a 100644
--- a/fs/Makefile
+++ b/fs/Makefile
@@ -123,3 +123,4 @@ obj-$(CONFIG_GFS2_FS) += gfs2/
obj-y += exofs/ # Multiple modules
obj-$(CONFIG_CEPH_FS) += ceph/
obj-$(CONFIG_PSTORE) += pstore/
+obj-$(CONFIG_AUFS_FS) += aufs/
diff --git a/include/linux/Kbuild b/include/linux/Kbuild
index 619b565..29f386b 100644
--- a/include/linux/Kbuild
+++ b/include/linux/Kbuild
@@ -65,6 +65,7 @@ header-y += atmppp.h
header-y += atmsap.h
header-y += atmsvc.h
header-y += audit.h
+header-y += aufs_type.h
header-y += auto_fs.h
header-y += auto_fs4.h
header-y += auxvec.h

287
linux/aufs3-loopback.patch Normal file
View File

@ -0,0 +1,287 @@
aufs3 loopback patch
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 1e888c9..17b3109 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -499,7 +499,7 @@ out:
}
struct switch_request {
- struct file *file;
+ struct file *file, *virt_file;
struct completion wait;
};
@@ -559,7 +559,8 @@ static int loop_thread(void *data)
* 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.
*/
-static int loop_switch(struct loop_device *lo, struct file *file)
+static int loop_switch(struct loop_device *lo, struct file *file,
+ struct file *virt_file)
{
struct switch_request w;
struct bio *bio = bio_alloc(GFP_KERNEL, 0);
@@ -567,6 +568,7 @@ static int loop_switch(struct loop_device *lo, struct file *file)
return -ENOMEM;
init_completion(&w.wait);
w.file = file;
+ w.virt_file = virt_file;
bio->bi_private = &w;
bio->bi_bdev = NULL;
loop_make_request(lo->lo_queue, bio);
@@ -583,7 +585,7 @@ static int loop_flush(struct loop_device *lo)
if (!lo->lo_thread)
return 0;
- return loop_switch(lo, NULL);
+ return loop_switch(lo, NULL, NULL);
}
/*
@@ -602,6 +604,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_backing_virt_file = p->virt_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);
@@ -610,6 +613,13 @@ out:
complete(&p->wait);
}
+static struct file *loop_real_file(struct file *file)
+{
+ struct file *f = NULL;
+ if (file->f_dentry->d_sb->s_op->real_loop)
+ f = file->f_dentry->d_sb->s_op->real_loop(file);
+ return f;
+}
/*
* loop_change_fd switched the backing store of a loopback device to
@@ -623,6 +633,7 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
unsigned int arg)
{
struct file *file, *old_file;
+ struct file *f, *virt_file = NULL, *old_virt_file;
struct inode *inode;
int error;
@@ -639,9 +650,16 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
file = fget(arg);
if (!file)
goto out;
+ f = loop_real_file(file);
+ if (f) {
+ virt_file = file;
+ file = f;
+ get_file(file);
+ }
inode = file->f_mapping->host;
old_file = lo->lo_backing_file;
+ old_virt_file = lo->lo_backing_virt_file;
error = -EINVAL;
@@ -653,17 +671,21 @@ static int loop_change_fd(struct loop_device *lo, struct block_device *bdev,
goto out_putf;
/* and ... switch */
- error = loop_switch(lo, file);
+ error = loop_switch(lo, file, virt_file);
if (error)
goto out_putf;
fput(old_file);
+ if (old_virt_file)
+ fput(old_virt_file);
if (lo->lo_flags & LO_FLAGS_PARTSCAN)
ioctl_by_bdev(bdev, BLKRRPART, 0);
return 0;
out_putf:
fput(file);
+ if (virt_file)
+ fput(virt_file);
out:
return error;
}
@@ -806,7 +828,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 file *file, *f;
+ struct file *file, *f, *virt_file = NULL;
struct inode *inode;
struct address_space *mapping;
unsigned lo_blocksize;
@@ -821,6 +843,12 @@ static int loop_set_fd(struct loop_device *lo, fmode_t mode,
file = fget(arg);
if (!file)
goto out;
+ f = loop_real_file(file);
+ if (f) {
+ virt_file = file;
+ file = f;
+ get_file(file);
+ }
error = -EBUSY;
if (lo->lo_state != Lo_unbound)
@@ -869,6 +897,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->lo_backing_virt_file = virt_file;
lo->transfer = transfer_none;
lo->ioctl = NULL;
lo->lo_sizelimit = 0;
@@ -914,6 +943,7 @@ out_clr:
lo->lo_thread = NULL;
lo->lo_device = NULL;
lo->lo_backing_file = NULL;
+ lo->lo_backing_virt_file = NULL;
lo->lo_flags = 0;
set_capacity(lo->lo_disk, 0);
invalidate_bdev(bdev);
@@ -923,6 +953,8 @@ out_clr:
lo->lo_state = Lo_unbound;
out_putf:
fput(file);
+ if (virt_file)
+ fput(virt_file);
out:
/* This is safe: open() is still holding a reference. */
module_put(THIS_MODULE);
@@ -969,6 +1001,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;
+ struct file *virt_filp = lo->lo_backing_virt_file;
gfp_t gfp = lo->old_gfp_mask;
struct block_device *bdev = lo->lo_device;
@@ -989,6 +1022,7 @@ static int loop_clr_fd(struct loop_device *lo)
spin_lock_irq(&lo->lo_lock);
lo->lo_backing_file = NULL;
+ lo->lo_backing_virt_file = NULL;
spin_unlock_irq(&lo->lo_lock);
loop_release_xfer(lo);
@@ -1029,6 +1063,8 @@ static int loop_clr_fd(struct loop_device *lo)
* bd_mutex which is usually taken before lo_ctl_mutex.
*/
fput(filp);
+ if (virt_filp)
+ fput(virt_filp);
return 0;
}
diff --git a/fs/aufs/f_op.c b/fs/aufs/f_op.c
index 942e71a..3d6a919 100644
--- a/fs/aufs/f_op.c
+++ b/fs/aufs/f_op.c
@@ -355,7 +355,7 @@ static ssize_t aufs_splice_read(struct file *file, loff_t *ppos,
err = -EINVAL;
h_file = au_hf_top(file);
get_file(h_file);
- if (au_test_loopback_kthread()) {
+ if (0 && au_test_loopback_kthread()) {
au_warn_loopback(h_file->f_dentry->d_sb);
if (file->f_mapping != h_file->f_mapping) {
file->f_mapping = h_file->f_mapping;
diff --git a/fs/aufs/loop.c b/fs/aufs/loop.c
index 317f0e4..45215c2 100644
--- a/fs/aufs/loop.c
+++ b/fs/aufs/loop.c
@@ -131,3 +131,19 @@ void au_loopback_fin(void)
{
kfree(au_warn_loopback_array);
}
+
+/* ---------------------------------------------------------------------- */
+
+/* support the loopback block device insude aufs */
+
+struct file *aufs_real_loop(struct file *file)
+{
+ struct file *f;
+
+ BUG_ON(!au_test_aufs(file->f_dentry->d_sb));
+ fi_read_lock(file);
+ f = au_hf_top(file);
+ fi_read_unlock(file);
+ AuDebugOn(!f);
+ return f;
+}
diff --git a/fs/aufs/loop.h b/fs/aufs/loop.h
index b7af6a7..7a50e6e 100644
--- a/fs/aufs/loop.h
+++ b/fs/aufs/loop.h
@@ -36,6 +36,8 @@ void au_warn_loopback(struct super_block *h_sb);
int au_loopback_init(void);
void au_loopback_fin(void);
+
+struct file *aufs_real_loop(struct file *file);
#else
AuStubInt0(au_test_loopback_overlap, struct super_block *sb,
struct dentry *h_adding)
@@ -44,6 +46,8 @@ AuStubVoid(au_warn_loopback, struct super_block *h_sb)
AuStubInt0(au_loopback_init, void)
AuStubVoid(au_loopback_fin, void)
+
+AuStub(struct file *, aufs_real_loop, return NULL, struct file *file)
#endif /* BLK_DEV_LOOP */
#endif /* __KERNEL__ */
diff --git a/fs/aufs/super.c b/fs/aufs/super.c
index c798792..fa77824 100644
--- a/fs/aufs/super.c
+++ b/fs/aufs/super.c
@@ -752,7 +752,10 @@ static const struct super_operations aufs_sop = {
.show_options = aufs_show_options,
.statfs = aufs_statfs,
.put_super = aufs_put_super,
- .remount_fs = aufs_remount_fs
+ .remount_fs = aufs_remount_fs,
+#ifdef CONFIG_AUFS_BDEV_LOOP
+ .real_loop = aufs_real_loop
+#endif
};
/* ---------------------------------------------------------------------- */
diff --git a/include/linux/fs.h b/include/linux/fs.h
index e0bc4ff..bd7b3a4 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1683,6 +1683,10 @@ struct super_operations {
int (*bdev_try_to_free_page)(struct super_block*, struct page*, gfp_t);
int (*nr_cached_objects)(struct super_block *);
void (*free_cached_objects)(struct super_block *, int);
+#if defined(CONFIG_BLK_DEV_LOOP) || defined(CONFIG_BLK_DEV_LOOP_MODULE)
+ /* and aufs */
+ struct file *(*real_loop)(struct file *);
+#endif
};
/*
diff --git a/include/linux/loop.h b/include/linux/loop.h
index 11a41a8..c190b78 100644
--- a/include/linux/loop.h
+++ b/include/linux/loop.h
@@ -48,7 +48,7 @@ struct loop_device {
int (*ioctl)(struct loop_device *, int cmd,
unsigned long arg);
- struct file * lo_backing_file;
+ struct file * lo_backing_file, *lo_backing_virt_file;
struct block_device *lo_device;
unsigned lo_blocksize;
void *key_data;

205
linux/aufs3-proc_map.patch Normal file
View File

@ -0,0 +1,205 @@
aufs3 proc_map patch
diff --git a/fs/proc/nommu.c b/fs/proc/nommu.c
index b1822dd..8b29ab7 100644
--- a/fs/proc/nommu.c
+++ b/fs/proc/nommu.c
@@ -46,6 +46,10 @@ static int nommu_region_show(struct seq_file *m, struct vm_region *region)
if (file) {
struct inode *inode = region->vm_file->f_path.dentry->d_inode;
+ if (region->vm_prfile) {
+ file = region->vm_prfile;
+ inode = file->f_path.dentry->d_inode;
+ }
dev = inode->i_sb->s_dev;
ino = inode->i_ino;
}
diff --git a/fs/proc/task_mmu.c b/fs/proc/task_mmu.c
index e418c5a..53efe92 100644
--- a/fs/proc/task_mmu.c
+++ b/fs/proc/task_mmu.c
@@ -222,6 +222,10 @@ static void show_map_vma(struct seq_file *m, struct vm_area_struct *vma)
if (file) {
struct inode *inode = vma->vm_file->f_path.dentry->d_inode;
+ if (vma->vm_prfile) {
+ file = vma->vm_prfile;
+ inode = file->f_path.dentry->d_inode;
+ }
dev = inode->i_sb->s_dev;
ino = inode->i_ino;
pgoff = ((loff_t)vma->vm_pgoff) << PAGE_SHIFT;
@@ -1033,6 +1037,8 @@ static int show_numa_map(struct seq_file *m, void *v)
if (file) {
seq_printf(m, " file=");
+ if (vma->vm_prfile)
+ file = vma->vm_prfile;
seq_path(m, &file->f_path, "\n\t= ");
} else if (vma->vm_start <= mm->brk && vma->vm_end >= mm->start_brk) {
seq_printf(m, " heap");
diff --git a/fs/proc/task_nommu.c b/fs/proc/task_nommu.c
index 980de54..4ee031f 100644
--- a/fs/proc/task_nommu.c
+++ b/fs/proc/task_nommu.c
@@ -148,6 +148,10 @@ static int nommu_vma_show(struct seq_file *m, struct vm_area_struct *vma)
if (file) {
struct inode *inode = vma->vm_file->f_path.dentry->d_inode;
+ if (vma->vm_prfile) {
+ file = vma->vm_prfile;
+ inode = file->f_path.dentry->d_inode;
+ }
dev = inode->i_sb->s_dev;
ino = inode->i_ino;
pgoff = (loff_t)vma->vm_pgoff << PAGE_SHIFT;
diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h
index 5b42f1b..a49a07e 100644
--- a/include/linux/mm_types.h
+++ b/include/linux/mm_types.h
@@ -186,6 +186,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 */
+ struct file *vm_prfile; /* the virtual 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
@@ -245,6 +246,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). */
+ struct file *vm_prfile; /* shadow of vm_file */
void * vm_private_data; /* was vm_pte (shared mem) */
#ifndef CONFIG_MMU
diff --git a/kernel/fork.c b/kernel/fork.c
index da4a6a1..3d19191 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -376,6 +376,8 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
struct address_space *mapping = file->f_mapping;
get_file(file);
+ if (tmp->vm_prfile)
+ get_file(tmp->vm_prfile);
if (tmp->vm_flags & VM_DENYWRITE)
atomic_dec(&inode->i_writecount);
mutex_lock(&mapping->i_mmap_mutex);
diff --git a/mm/memory.c b/mm/memory.c
index 829d437..3c1b28f12 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -2622,6 +2622,8 @@ reuse:
/* file_update_time outside page_lock */
if (vma->vm_file)
file_update_time(vma->vm_file);
+ if (vma->vm_prfile)
+ file_update_time(vma->vm_prfile);
return ret;
}
@@ -3307,6 +3309,8 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
/* file_update_time outside page_lock */
if (vma->vm_file)
file_update_time(vma->vm_file);
+ if (vma->vm_prfile)
+ file_update_time(vma->vm_prfile);
} else {
unlock_page(vmf.page);
if (anon)
diff --git a/mm/mmap.c b/mm/mmap.c
index eae90af..c182f23 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -232,6 +232,8 @@ static struct vm_area_struct *remove_vma(struct vm_area_struct *vma)
vma->vm_ops->close(vma);
if (vma->vm_file) {
fput(vma->vm_file);
+ if (vma->vm_prfile)
+ fput(vma->vm_prfile);
if (vma->vm_flags & VM_EXECUTABLE)
removed_exe_file_vma(vma->vm_mm);
}
@@ -619,6 +621,8 @@ again: remove_next = 1 + (end > next->vm_end);
if (remove_next) {
if (file) {
fput(file);
+ if (vma->vm_prfile)
+ fput(vma->vm_prfile);
if (next->vm_flags & VM_EXECUTABLE)
removed_exe_file_vma(mm);
}
@@ -1965,6 +1969,8 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
if (new->vm_file) {
get_file(new->vm_file);
+ if (new->vm_prfile)
+ get_file(new->vm_prfile);
if (vma->vm_flags & VM_EXECUTABLE)
added_exe_file_vma(mm);
}
@@ -1989,6 +1995,8 @@ static int __split_vma(struct mm_struct * mm, struct vm_area_struct * vma,
if (vma->vm_flags & VM_EXECUTABLE)
removed_exe_file_vma(mm);
fput(new->vm_file);
+ if (new->vm_prfile)
+ fput(new->vm_prfile);
}
unlink_anon_vmas(new);
out_free_mpol:
@@ -2356,6 +2364,8 @@ struct vm_area_struct *copy_vma(struct vm_area_struct **vmap,
new_vma->vm_pgoff = pgoff;
if (new_vma->vm_file) {
get_file(new_vma->vm_file);
+ if (new_vma->vm_prfile)
+ get_file(new_vma->vm_prfile);
if (vma->vm_flags & VM_EXECUTABLE)
added_exe_file_vma(mm);
}
diff --git a/mm/nommu.c b/mm/nommu.c
index b982290..42fbe0e 100644
--- a/mm/nommu.c
+++ b/mm/nommu.c
@@ -633,6 +633,8 @@ static void __put_nommu_region(struct vm_region *region)
if (region->vm_file)
fput(region->vm_file);
+ if (region->vm_prfile)
+ fput(region->vm_prfile);
/* IO memory and memory shared directly out of the pagecache
* from ramfs/tmpfs mustn't be released here */
@@ -789,6 +791,8 @@ static void delete_vma(struct mm_struct *mm, struct vm_area_struct *vma)
vma->vm_ops->close(vma);
if (vma->vm_file) {
fput(vma->vm_file);
+ if (vma->vm_prfile)
+ fput(vma->vm_prfile);
if (vma->vm_flags & VM_EXECUTABLE)
removed_exe_file_vma(mm);
}
@@ -1362,6 +1366,8 @@ unsigned long do_mmap_pgoff(struct file *file,
}
}
fput(region->vm_file);
+ if (region->vm_prfile)
+ fput(region->vm_prfile);
kmem_cache_free(vm_region_jar, region);
region = pregion;
result = start;
@@ -1438,9 +1444,13 @@ error_just_free:
error:
if (region->vm_file)
fput(region->vm_file);
+ if (region->vm_prfile)
+ fput(region->vm_prfile);
kmem_cache_free(vm_region_jar, region);
if (vma->vm_file)
fput(vma->vm_file);
+ if (vma->vm_prfile)
+ fput(vma->vm_prfile);
if (vma->vm_flags & VM_EXECUTABLE)
removed_exe_file_vma(vma->vm_mm);
kmem_cache_free(vm_area_cachep, vma);

View File

@ -0,0 +1,257 @@
aufs3 standalone patch
diff --git a/fs/file_table.c b/fs/file_table.c
index c322794..2aad244 100644
--- a/fs/file_table.c
+++ b/fs/file_table.c
@@ -443,6 +443,8 @@ void file_sb_list_del(struct file *file)
}
}
+EXPORT_SYMBOL_GPL(file_sb_list_del);
+
#ifdef CONFIG_SMP
/*
diff --git a/fs/inode.c b/fs/inode.c
index ee4e66b..728042b 100644
--- a/fs/inode.c
+++ b/fs/inode.c
@@ -65,6 +65,7 @@ static struct hlist_head *inode_hashtable __read_mostly;
static __cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_hash_lock);
__cacheline_aligned_in_smp DEFINE_SPINLOCK(inode_sb_list_lock);
+EXPORT_SYMBOL_GPL(inode_sb_list_lock);
/*
* Empty aops. Can be used for the cases where the user does not
diff --git a/fs/namei.c b/fs/namei.c
index 4cc94cf..af19e30 100644
--- a/fs/namei.c
+++ b/fs/namei.c
@@ -1757,6 +1757,7 @@ struct dentry *lookup_hash(struct nameidata *nd)
{
return __lookup_hash(&nd->last, nd->path.dentry, nd);
}
+EXPORT_SYMBOL_GPL(lookup_hash);
/**
* lookup_one_len - filesystem helper to lookup single pathname component
diff --git a/fs/namespace.c b/fs/namespace.c
index cfc6d44..173d15a 100644
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -1506,6 +1506,7 @@ int iterate_mounts(int (*f)(struct vfsmount *, void *), void *arg,
}
return 0;
}
+EXPORT_SYMBOL_GPL(iterate_mounts);
static void cleanup_group_ids(struct vfsmount *mnt, struct vfsmount *end)
{
diff --git a/fs/notify/group.c b/fs/notify/group.c
index 63fc294..6f4adca 100644
--- a/fs/notify/group.c
+++ b/fs/notify/group.c
@@ -22,6 +22,7 @@
#include <linux/srcu.h>
#include <linux/rculist.h>
#include <linux/wait.h>
+#include <linux/module.h>
#include <linux/fsnotify_backend.h>
#include "fsnotify.h"
@@ -70,6 +71,7 @@ void fsnotify_put_group(struct fsnotify_group *group)
if (atomic_dec_and_test(&group->refcnt))
fsnotify_destroy_group(group);
}
+EXPORT_SYMBOL_GPL(fsnotify_put_group);
/*
* Create a new fsnotify_group and hold a reference for the group returned.
@@ -102,3 +104,4 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
return group;
}
+EXPORT_SYMBOL_GPL(fsnotify_alloc_group);
diff --git a/fs/notify/mark.c b/fs/notify/mark.c
index e14587d..be6533b 100644
--- a/fs/notify/mark.c
+++ b/fs/notify/mark.c
@@ -112,6 +112,7 @@ void fsnotify_put_mark(struct fsnotify_mark *mark)
if (atomic_dec_and_test(&mark->refcnt))
mark->free_mark(mark);
}
+EXPORT_SYMBOL_GPL(fsnotify_put_mark);
/*
* Any time a mark is getting freed we end up here.
@@ -189,6 +190,7 @@ void fsnotify_destroy_mark(struct fsnotify_mark *mark)
if (unlikely(atomic_dec_and_test(&group->num_marks)))
fsnotify_final_destroy_group(group);
}
+EXPORT_SYMBOL_GPL(fsnotify_destroy_mark);
void fsnotify_set_mark_mask_locked(struct fsnotify_mark *mark, __u32 mask)
{
@@ -276,6 +278,7 @@ err:
return ret;
}
+EXPORT_SYMBOL_GPL(fsnotify_add_mark);
/*
* clear any marks in a group in which mark->flags & flags is true
@@ -331,6 +334,7 @@ void fsnotify_init_mark(struct fsnotify_mark *mark,
atomic_set(&mark->refcnt, 1);
mark->free_mark = free_mark;
}
+EXPORT_SYMBOL_GPL(fsnotify_init_mark);
static int fsnotify_mark_destroy(void *ignored)
{
diff --git a/fs/open.c b/fs/open.c
index 22c41b5..33b4033 100644
--- a/fs/open.c
+++ b/fs/open.c
@@ -60,6 +60,7 @@ int do_truncate(struct dentry *dentry, loff_t length, unsigned int time_attrs,
mutex_unlock(&dentry->d_inode->i_mutex);
return ret;
}
+EXPORT_SYMBOL_GPL(do_truncate);
static long do_sys_truncate(const char __user *pathname, loff_t length)
{
diff --git a/fs/splice.c b/fs/splice.c
index e3569b0..9dc07b7 100644
--- a/fs/splice.c
+++ b/fs/splice.c
@@ -1109,6 +1109,7 @@ long do_splice_from(struct pipe_inode_info *pipe, struct file *out,
return splice_write(pipe, out, ppos, len, flags);
}
+EXPORT_SYMBOL_GPL(do_splice_from);
/*
* Attempt to initiate a splice from a file to a pipe.
@@ -1135,6 +1136,7 @@ long do_splice_to(struct file *in, loff_t *ppos,
return splice_read(in, ppos, pipe, len, flags);
}
+EXPORT_SYMBOL_GPL(do_splice_to);
/**
* splice_direct_to_actor - splices data directly between two non-pipes
diff --git a/security/commoncap.c b/security/commoncap.c
index ee4f848..611fd70 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -975,3 +975,4 @@ int cap_file_mmap(struct file *file, unsigned long reqprot,
}
return ret;
}
+EXPORT_SYMBOL_GPL(cap_file_mmap);
diff --git a/security/device_cgroup.c b/security/device_cgroup.c
index 4450fbe..bc94175 100644
--- a/security/device_cgroup.c
+++ b/security/device_cgroup.c
@@ -7,6 +7,7 @@
#include <linux/device_cgroup.h>
#include <linux/cgroup.h>
#include <linux/ctype.h>
+#include <linux/export.h>
#include <linux/list.h>
#include <linux/uaccess.h>
#include <linux/seq_file.h>
@@ -500,6 +501,7 @@ found:
return -EPERM;
}
+EXPORT_SYMBOL_GPL(__devcgroup_inode_permission);
int devcgroup_inode_mknod(int mode, dev_t dev)
{
diff --git a/security/security.c b/security/security.c
index e2f684a..892000c 100644
--- a/security/security.c
+++ b/security/security.c
@@ -411,6 +411,7 @@ int security_path_rmdir(struct path *dir, struct dentry *dentry)
return 0;
return security_ops->path_rmdir(dir, dentry);
}
+EXPORT_SYMBOL_GPL(security_path_rmdir);
int security_path_unlink(struct path *dir, struct dentry *dentry)
{
@@ -427,6 +428,7 @@ int security_path_symlink(struct path *dir, struct dentry *dentry,
return 0;
return security_ops->path_symlink(dir, dentry, old_name);
}
+EXPORT_SYMBOL_GPL(security_path_symlink);
int security_path_link(struct dentry *old_dentry, struct path *new_dir,
struct dentry *new_dentry)
@@ -435,6 +437,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);
}
+EXPORT_SYMBOL_GPL(security_path_link);
int security_path_rename(struct path *old_dir, struct dentry *old_dentry,
struct path *new_dir, struct dentry *new_dentry)
@@ -453,6 +456,7 @@ int security_path_truncate(struct path *path)
return 0;
return security_ops->path_truncate(path);
}
+EXPORT_SYMBOL_GPL(security_path_truncate);
int security_path_chmod(struct dentry *dentry, struct vfsmount *mnt,
mode_t mode)
@@ -461,6 +465,7 @@ int security_path_chmod(struct dentry *dentry, struct vfsmount *mnt,
return 0;
return security_ops->path_chmod(dentry, mnt, mode);
}
+EXPORT_SYMBOL_GPL(security_path_chmod);
int security_path_chown(struct path *path, uid_t uid, gid_t gid)
{
@@ -468,6 +473,7 @@ int security_path_chown(struct path *path, uid_t uid, gid_t gid)
return 0;
return security_ops->path_chown(path, uid, gid);
}
+EXPORT_SYMBOL_GPL(security_path_chown);
int security_path_chroot(struct path *path)
{
@@ -544,6 +550,7 @@ int security_inode_readlink(struct dentry *dentry)
return 0;
return security_ops->inode_readlink(dentry);
}
+EXPORT_SYMBOL_GPL(security_inode_readlink);
int security_inode_follow_link(struct dentry *dentry, struct nameidata *nd)
{
@@ -558,6 +565,7 @@ int security_inode_permission(struct inode *inode, int mask)
return 0;
return security_ops->inode_permission(inode, mask);
}
+EXPORT_SYMBOL_GPL(security_inode_permission);
int security_inode_setattr(struct dentry *dentry, struct iattr *attr)
{
@@ -673,6 +681,7 @@ int security_file_permission(struct file *file, int mask)
return fsnotify_perm(file, mask);
}
+EXPORT_SYMBOL_GPL(security_file_permission);
int security_file_alloc(struct file *file)
{
@@ -700,6 +709,7 @@ int security_file_mmap(struct file *file, unsigned long reqprot,
return ret;
return ima_file_mmap(file, prot);
}
+EXPORT_SYMBOL_GPL(security_file_mmap);
int security_file_mprotect(struct vm_area_struct *vma, unsigned long reqprot,
unsigned long prot)

30116
linux/aufs3.patch Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

19
linux/config.aufs Normal file
View File

@ -0,0 +1,19 @@
CONFIG_AUFS_FS=m
CONFIG_AUFS_BRANCH_MAX_127=y
# CONFIG_AUFS_BRANCH_MAX_511 is not set
# CONFIG_AUFS_BRANCH_MAX_1023 is not set
# CONFIG_AUFS_BRANCH_MAX_32767 is not set
CONFIG_AUFS_SBILIST=y
CONFIG_AUFS_HNOTIFY=y
CONFIG_AUFS_HFSNOTIFY=y
CONFIG_AUFS_EXPORT=y
CONFIG_AUFS_RDU=y
CONFIG_AUFS_PROC_MAP=y
CONFIG_AUFS_SP_IATTR=y
CONFIG_AUFS_SHWH=y
CONFIG_AUFS_BR_RAMFS=y
CONFIG_AUFS_BR_FUSE=y
CONFIG_AUFS_POLL=y
CONFIG_AUFS_BR_HFSPLUS=y
CONFIG_AUFS_BDEV_LOOP=y
# CONFIG_AUFS_DEBUG is not set