diff --git a/features/unionfs/unionfs-update-unionfs-fork-to-align-with-mainline.patch b/features/unionfs/unionfs-update-unionfs-fork-to-align-with-mainline.patch new file mode 100644 index 0000000000000000000000000000000000000000..3bc691b112711ea7fe212dac23fe98b85f905aca --- /dev/null +++ b/features/unionfs/unionfs-update-unionfs-fork-to-align-with-mainline.patch @@ -0,0 +1,53 @@ +From 9f0fe583ffc5116584d8c4800a7fa28bb4ff9b09 Mon Sep 17 00:00:00 2001 +From: Liang Li <liang.li@windriver.com> +Date: Thu, 16 Aug 2012 21:25:01 +0800 +Subject: [PATCH] unionfs: update unionfs fork to align with mainline + +mainline commit 0145acc [vfs: uninline full_name_hash] changes the +interface to full_name_hash, so unionfs fork must be updated. +Otherwise unionfs might have the odd behavior that newly created +directories/files in unionfs won't show up in underlying fs properly. + +This also implies that 0145acc fixes the corner issue/regression that +introduced by mainline commit bfcfaa7 [vfs: use 'unsigned long' +accesses for dcache name comparison and hashing] and e419b4c [vfs: +make word-at-a-time accesses handle a non-existing page], that newly +adopted fast hash function might have hash collision issue on x86. + +Signed-off-by: Liang Li <liang.li@windriver.com> +--- + fs/namei.c | 6 ++---- + 1 files changed, 2 insertions(+), 4 deletions(-) + +diff --git a/fs/namei.c b/fs/namei.c +index de81292..afb6cc8 100644 +--- a/fs/namei.c ++++ b/fs/namei.c +@@ -1889,7 +1889,6 @@ struct dentry *lookup_one_len_nd(const char *name, struct dentry *base, + int len, struct nameidata *nd) + { + struct qstr this; +- unsigned long hash; + unsigned int c; + + WARN_ON_ONCE(!mutex_is_locked(&base->d_inode->i_mutex)); +@@ -1899,14 +1898,13 @@ struct dentry *lookup_one_len_nd(const char *name, struct dentry *base, + if (!len) + return ERR_PTR(-EACCES); + +- hash = init_name_hash(); ++ this.hash = full_name_hash(name, len); ++ + while (len--) { + c = *(const unsigned char *)name++; + if (c == '/' || c == '\0') + return ERR_PTR(-EACCES); +- hash = partial_name_hash(c, hash); + } +- this.hash = end_name_hash(hash); + /* + * See if the low-level filesystem might want + * to use its own hash.. +-- +1.7.5.4 + diff --git a/features/unionfs/unionfs.scc b/features/unionfs/unionfs.scc index 46574ca25888a94dcf0e1c160267ec6331e6f177..0c6484cf01a354cfd5f5d3d89f3186018d8a42d3 100644 --- a/features/unionfs/unionfs.scc +++ b/features/unionfs/unionfs.scc @@ -7,3 +7,4 @@ patch unionfs-v3.4-build-fixups.patch patch unionfs-change-end_writeback-to-clear_inode.patch patch Unionfs-update-show_options-prototype.patch patch Unionfs-use-mode_t.patch +patch unionfs-update-unionfs-fork-to-align-with-mainline.patch