aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/dir.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2012-05-10 16:14:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2012-05-10 22:54:35 -0400
commit26fe575028703948880fce4355a210c76bb0536e (patch)
tree0a7d04289e1eb1f1739659ebc9498d40f2add5da /fs/nfs/dir.c
parentee983e89670704b2a05e897b161f2674a42d1508 (diff)
vfs: make it possible to access the dentry hash/len as one 64-bit entry
This allows comparing hash and len in one operation on 64-bit architectures. Right now only __d_lookup_rcu() takes advantage of this, since that is the case we care most about. The use of anonymous struct/unions hides the alternate 64-bit approach from most users, the exception being a few cases where we initialize a 'struct qstr' with a static initializer. This makes the problematic cases use a new QSTR_INIT() helper function for that (but initializing just the name pointer with a "{ .name = xyzzy }" initializer remains valid, as does just copying another qstr structure). Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'fs/nfs/dir.c')
-rw-r--r--fs/nfs/dir.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c
index 8789210c6905..eedd24d0ad2e 100644
--- a/fs/nfs/dir.c
+++ b/fs/nfs/dir.c
@@ -477,10 +477,7 @@ different:
477static 477static
478void nfs_prime_dcache(struct dentry *parent, struct nfs_entry *entry) 478void nfs_prime_dcache(struct dentry *parent, struct nfs_entry *entry)
479{ 479{
480 struct qstr filename = { 480 struct qstr filename = QSTR_INIT(entry->name, entry->len);
481 .len = entry->len,
482 .name = entry->name,
483 };
484 struct dentry *dentry; 481 struct dentry *dentry;
485 struct dentry *alias; 482 struct dentry *alias;
486 struct inode *dir = parent->d_inode; 483 struct inode *dir = parent->d_inode;