4040/*
4141 * Usage:
4242 * dcache->d_inode->i_lock protects:
43- * - i_dentry, d_u. d_alias, d_inode of aliases
43+ * - i_dentry, d_alias, d_inode of aliases
4444 * dcache_hash_bucket lock protects:
4545 * - the dcache hash table
4646 * s_roots bl list spinlock protects:
5555 * - d_unhashed()
5656 * - d_parent and d_chilren
5757 * - childrens' d_sib and d_parent
58- * - d_u. d_alias, d_inode
58+ * - d_alias, d_inode
5959 *
6060 * Ordering:
6161 * dentry->d_inode->i_lock
@@ -341,14 +341,14 @@ static inline struct external_name *external_name(struct dentry *dentry)
341341
342342static void __d_free (struct rcu_head * head )
343343{
344- struct dentry * dentry = container_of (head , struct dentry , d_u . d_rcu );
344+ struct dentry * dentry = container_of (head , struct dentry , d_rcu );
345345
346346 kmem_cache_free (dentry_cache , dentry );
347347}
348348
349349static void __d_free_external (struct rcu_head * head )
350350{
351- struct dentry * dentry = container_of (head , struct dentry , d_u . d_rcu );
351+ struct dentry * dentry = container_of (head , struct dentry , d_rcu );
352352 kfree (external_name (dentry ));
353353 kmem_cache_free (dentry_cache , dentry );
354354}
@@ -428,19 +428,19 @@ static inline void __d_clear_type_and_inode(struct dentry *dentry)
428428
429429static void dentry_free (struct dentry * dentry )
430430{
431- WARN_ON (!hlist_unhashed (& dentry -> d_u . d_alias ));
431+ WARN_ON (!hlist_unhashed (& dentry -> d_alias ));
432432 if (unlikely (dname_external (dentry ))) {
433433 struct external_name * p = external_name (dentry );
434434 if (likely (atomic_dec_and_test (& p -> count ))) {
435- call_rcu (& dentry -> d_u . d_rcu , __d_free_external );
435+ call_rcu (& dentry -> d_rcu , __d_free_external );
436436 return ;
437437 }
438438 }
439439 /* if dentry was never visible to RCU, immediate free is OK */
440440 if (dentry -> d_flags & DCACHE_NORCU )
441- __d_free (& dentry -> d_u . d_rcu );
441+ __d_free (& dentry -> d_rcu );
442442 else
443- call_rcu (& dentry -> d_u . d_rcu , __d_free );
443+ call_rcu (& dentry -> d_rcu , __d_free );
444444}
445445
446446/*
@@ -455,7 +455,7 @@ static void dentry_unlink_inode(struct dentry * dentry)
455455
456456 raw_write_seqcount_begin (& dentry -> d_seq );
457457 __d_clear_type_and_inode (dentry );
458- hlist_del_init (& dentry -> d_u . d_alias );
458+ hlist_del_init (& dentry -> d_alias );
459459 raw_write_seqcount_end (& dentry -> d_seq );
460460 spin_unlock (& dentry -> d_lock );
461461 spin_unlock (& inode -> i_lock );
@@ -1010,7 +1010,7 @@ static struct dentry * __d_find_any_alias(struct inode *inode)
10101010
10111011 if (hlist_empty (& inode -> i_dentry ))
10121012 return NULL ;
1013- alias = hlist_entry (inode -> i_dentry .first , struct dentry , d_u . d_alias );
1013+ alias = hlist_entry (inode -> i_dentry .first , struct dentry , d_alias );
10141014 lockref_get (& alias -> d_lockref );
10151015 return alias ;
10161016}
@@ -1093,9 +1093,9 @@ struct dentry *d_find_alias_rcu(struct inode *inode)
10931093 // used without having I_FREEING set, which means no aliases left
10941094 if (likely (!(inode_state_read (inode ) & I_FREEING ) && !hlist_empty (l ))) {
10951095 if (S_ISDIR (inode -> i_mode )) {
1096- de = hlist_entry (l -> first , struct dentry , d_u . d_alias );
1096+ de = hlist_entry (l -> first , struct dentry , d_alias );
10971097 } else {
1098- hlist_for_each_entry (de , l , d_u . d_alias )
1098+ hlist_for_each_entry (de , l , d_alias )
10991099 if (!d_unhashed (de ))
11001100 break ;
11011101 }
@@ -1787,7 +1787,7 @@ static struct dentry *__d_alloc(struct super_block *sb, const struct qstr *name)
17871787 INIT_HLIST_BL_NODE (& dentry -> d_hash );
17881788 INIT_LIST_HEAD (& dentry -> d_lru );
17891789 INIT_HLIST_HEAD (& dentry -> d_children );
1790- INIT_HLIST_NODE (& dentry -> d_u . d_alias );
1790+ INIT_HLIST_NODE (& dentry -> d_alias );
17911791 INIT_HLIST_NODE (& dentry -> d_sib );
17921792
17931793 if (dentry -> d_op && dentry -> d_op -> d_init ) {
@@ -1980,7 +1980,7 @@ static void __d_instantiate(struct dentry *dentry, struct inode *inode)
19801980 if ((dentry -> d_flags &
19811981 (DCACHE_LRU_LIST |DCACHE_SHRINK_LIST )) == DCACHE_LRU_LIST )
19821982 this_cpu_dec (nr_dentry_negative );
1983- hlist_add_head (& dentry -> d_u . d_alias , & inode -> i_dentry );
1983+ hlist_add_head (& dentry -> d_alias , & inode -> i_dentry );
19841984 raw_write_seqcount_begin (& dentry -> d_seq );
19851985 __d_set_inode_and_type (dentry , inode , add_flags );
19861986 raw_write_seqcount_end (& dentry -> d_seq );
@@ -2004,7 +2004,7 @@ static void __d_instantiate(struct dentry *dentry, struct inode *inode)
20042004
20052005void d_instantiate (struct dentry * entry , struct inode * inode )
20062006{
2007- BUG_ON (!hlist_unhashed (& entry -> d_u . d_alias ));
2007+ BUG_ON (!hlist_unhashed (& entry -> d_alias ));
20082008 if (inode ) {
20092009 security_d_instantiate (entry , inode );
20102010 spin_lock (& inode -> i_lock );
@@ -2024,7 +2024,7 @@ EXPORT_SYMBOL(d_instantiate);
20242024 */
20252025void d_instantiate_new (struct dentry * entry , struct inode * inode )
20262026{
2027- BUG_ON (!hlist_unhashed (& entry -> d_u . d_alias ));
2027+ BUG_ON (!hlist_unhashed (& entry -> d_alias ));
20282028 BUG_ON (!inode );
20292029 lockdep_annotate_inode_mutex_key (inode );
20302030 security_d_instantiate (entry , inode );
@@ -2087,7 +2087,7 @@ static struct dentry *__d_obtain_alias(struct inode *inode, bool disconnected)
20872087
20882088 spin_lock (& new -> d_lock );
20892089 __d_set_inode_and_type (new , inode , add_flags );
2090- hlist_add_head (& new -> d_u . d_alias , & inode -> i_dentry );
2090+ hlist_add_head (& new -> d_alias , & inode -> i_dentry );
20912091 if (!disconnected ) {
20922092 hlist_bl_lock (& sb -> s_roots );
20932093 hlist_bl_add_head (& new -> d_hash , & sb -> s_roots );
@@ -2658,7 +2658,7 @@ struct dentry *d_alloc_parallel(struct dentry *parent,
26582658 * we unlock the chain. All fields are stable in everything
26592659 * we encounter.
26602660 */
2661- hlist_bl_for_each_entry (dentry , node , b , d_u . d_in_lookup_hash ) {
2661+ hlist_bl_for_each_entry (dentry , node , b , d_in_lookup_hash ) {
26622662 if (dentry -> d_name .hash != hash )
26632663 continue ;
26642664 if (dentry -> d_parent != parent )
@@ -2700,7 +2700,7 @@ struct dentry *d_alloc_parallel(struct dentry *parent,
27002700 }
27012701 rcu_read_unlock ();
27022702 new -> d_wait = wq ;
2703- hlist_bl_add_head (& new -> d_u . d_in_lookup_hash , b );
2703+ hlist_bl_add_head (& new -> d_in_lookup_hash , b );
27042704 hlist_bl_unlock (b );
27052705 return new ;
27062706mismatch :
@@ -2725,11 +2725,11 @@ static wait_queue_head_t *__d_lookup_unhash(struct dentry *dentry)
27252725 b = in_lookup_hash (dentry -> d_parent , dentry -> d_name .hash );
27262726 hlist_bl_lock (b );
27272727 dentry -> d_flags &= ~DCACHE_PAR_LOOKUP ;
2728- __hlist_bl_del (& dentry -> d_u . d_in_lookup_hash );
2728+ __hlist_bl_del (& dentry -> d_in_lookup_hash );
27292729 d_wait = dentry -> d_wait ;
27302730 dentry -> d_wait = NULL ;
27312731 hlist_bl_unlock (b );
2732- INIT_HLIST_NODE (& dentry -> d_u . d_alias );
2732+ INIT_HLIST_NODE (& dentry -> d_alias );
27332733 INIT_LIST_HEAD (& dentry -> d_lru );
27342734 return d_wait ;
27352735}
@@ -2760,7 +2760,7 @@ static inline void __d_add(struct dentry *dentry, struct inode *inode,
27602760 d_set_d_op (dentry , ops );
27612761 if (inode ) {
27622762 unsigned add_flags = d_flags_for_inode (inode );
2763- hlist_add_head (& dentry -> d_u . d_alias , & inode -> i_dentry );
2763+ hlist_add_head (& dentry -> d_alias , & inode -> i_dentry );
27642764 raw_write_seqcount_begin (& dentry -> d_seq );
27652765 __d_set_inode_and_type (dentry , inode , add_flags );
27662766 raw_write_seqcount_end (& dentry -> d_seq );
@@ -2795,7 +2795,7 @@ EXPORT_SYMBOL(d_add);
27952795
27962796struct dentry * d_make_persistent (struct dentry * dentry , struct inode * inode )
27972797{
2798- WARN_ON (!hlist_unhashed (& dentry -> d_u . d_alias ));
2798+ WARN_ON (!hlist_unhashed (& dentry -> d_alias ));
27992799 WARN_ON (!inode );
28002800 security_d_instantiate (dentry , inode );
28012801 spin_lock (& inode -> i_lock );
@@ -3185,7 +3185,7 @@ void d_mark_tmpfile(struct file *file, struct inode *inode)
31853185 struct dentry * dentry = file -> f_path .dentry ;
31863186
31873187 BUG_ON (dname_external (dentry ) ||
3188- !hlist_unhashed (& dentry -> d_u . d_alias ) ||
3188+ !hlist_unhashed (& dentry -> d_alias ) ||
31893189 !d_unlinked (dentry ));
31903190 spin_lock (& dentry -> d_parent -> d_lock );
31913191 spin_lock_nested (& dentry -> d_lock , DENTRY_D_LOCK_NESTED );
0 commit comments