From e368a1447942825ad569bcbf5e4a2b98094636f4 Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Sat, 30 Oct 2010 18:37:14 +0200 Subject: add aufs 2.6.36 patch --- patches/aufs2-2.6.36.patch | 130 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 patches/aufs2-2.6.36.patch (limited to 'patches') diff --git a/patches/aufs2-2.6.36.patch b/patches/aufs2-2.6.36.patch new file mode 100644 index 0000000..6fa2900 --- /dev/null +++ b/patches/aufs2-2.6.36.patch @@ -0,0 +1,130 @@ +diff --git a/fs/file_table.c b/fs/file_table.c +index a04bdd8..fbf8908 100644 +--- a/fs/file_table.c ++++ b/fs/file_table.c +@@ -20,7 +20,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -34,7 +33,6 @@ struct files_stat_struct files_stat = { + .max_files = NR_FILE + }; + +-DECLARE_LGLOCK(files_lglock); + DEFINE_LGLOCK(files_lglock); + + /* SLAB cache for file structures */ +@@ -394,37 +392,6 @@ void file_sb_list_del(struct file *file) + } + } + +-#ifdef CONFIG_SMP +- +-/* +- * These macros iterate all files on all CPUs for a given superblock. +- * files_lglock must be held globally. +- */ +-#define do_file_list_for_each_entry(__sb, __file) \ +-{ \ +- int i; \ +- for_each_possible_cpu(i) { \ +- struct list_head *list; \ +- list = per_cpu_ptr((__sb)->s_files, i); \ +- list_for_each_entry((__file), list, f_u.fu_list) +- +-#define while_file_list_for_each_entry \ +- } \ +-} +- +-#else +- +-#define do_file_list_for_each_entry(__sb, __file) \ +-{ \ +- struct list_head *list; \ +- list = &(sb)->s_files; \ +- list_for_each_entry((__file), list, f_u.fu_list) +- +-#define while_file_list_for_each_entry \ +-} +- +-#endif +- + int fs_may_remount_ro(struct super_block *sb) + { + struct file *file; +diff --git a/fs/statfs.c b/fs/statfs.c +index 30ea8c8..9025c98 100644 +--- a/fs/statfs.c ++++ b/fs/statfs.c +@@ -61,6 +61,7 @@ int statfs_by_dentry(struct dentry *dentry, struct kstatfs *buf) + buf->f_frsize = buf->f_bsize; + return retval; + } ++EXPORT_SYMBOL(statfs_by_dentry); + + int vfs_statfs(struct path *path, struct kstatfs *buf) + { +diff --git a/include/linux/fs.h b/include/linux/fs.h +index 63d069b..741d296 100644 +--- a/include/linux/fs.h ++++ b/include/linux/fs.h +@@ -9,6 +9,7 @@ + #include + #include + #include ++#include + + /* + * It's silly to have NR_OPEN bigger than NR_FILE, but you can change +@@ -1814,6 +1815,7 @@ extern struct vfsmount *collect_mounts(struct path *); + extern void drop_collected_mounts(struct vfsmount *); + extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, + struct vfsmount *); ++extern int statfs_by_dentry(struct dentry *dentry, struct kstatfs *buf); + extern int vfs_statfs(struct path *, struct kstatfs *); + extern int statfs_by_dentry(struct dentry *, struct kstatfs *); + extern int freeze_super(struct super_block *super); +@@ -2481,5 +2483,39 @@ int __init get_filesystem_list(char *buf); + #define OPEN_FMODE(flag) ((__force fmode_t)(((flag + 1) & O_ACCMODE) | \ + (flag & FMODE_NONOTIFY))) + ++ ++DECLARE_LGLOCK(files_lglock); ++ ++#ifdef CONFIG_SMP ++ ++/* ++ * These macros iterate all files on all CPUs for a given superblock. ++ * files_lglock must be held globally. ++ */ ++#define do_file_list_for_each_entry(__sb, __file) \ ++{ \ ++ int i; \ ++ for_each_possible_cpu(i) { \ ++ struct list_head *list; \ ++ list = per_cpu_ptr((__sb)->s_files, i); \ ++ list_for_each_entry((__file), list, f_u.fu_list) ++ ++#define while_file_list_for_each_entry \ ++ } \ ++} ++ ++#else ++ ++#define do_file_list_for_each_entry(__sb, __file) \ ++{ \ ++ struct list_head *list; \ ++ list = &(sb)->s_files; \ ++ list_for_each_entry((__file), list, f_u.fu_list) ++ ++#define while_file_list_for_each_entry \ ++} ++ ++#endif ++ + #endif /* __KERNEL__ */ + #endif /* _LINUX_FS_H */ -- cgit v1.2.2