Skip to content
Snippets Groups Projects
Commit dbbfff38 authored by Bruce Ashfield's avatar Bruce Ashfield
Browse files

unionfs: update unionfs fork to align with mainline


1/1 [
Author: Liang Li
Email: liang.li@windriver.com
Subject: unionfs: update unionfs fork to align with mainline
Date: Thu, 16 Aug 2012 21:25:01 +0800

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: default avatarLiang Li <liang.li@windriver.com>
]

Signed-off-by: default avatarBruce Ashfield <bruce.ashfield@windriver.com>
parent 9d5b74b6
No related branches found
No related tags found
No related merge requests found
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
......@@ -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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment