diff options
Diffstat (limited to 'fs/inode.c')
-rw-r--r-- | fs/inode.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/inode.c b/fs/inode.c index fb10d86ffad7..83ab215baab1 100644 --- a/fs/inode.c +++ b/fs/inode.c | |||
@@ -938,8 +938,7 @@ void lockdep_annotate_inode_mutex_key(struct inode *inode) | |||
938 | struct file_system_type *type = inode->i_sb->s_type; | 938 | struct file_system_type *type = inode->i_sb->s_type; |
939 | 939 | ||
940 | /* Set new key only if filesystem hasn't already changed it */ | 940 | /* Set new key only if filesystem hasn't already changed it */ |
941 | if (!lockdep_match_class(&inode->i_mutex, | 941 | if (lockdep_match_class(&inode->i_mutex, &type->i_mutex_key)) { |
942 | &type->i_mutex_key)) { | ||
943 | /* | 942 | /* |
944 | * ensure nobody is actually holding i_mutex | 943 | * ensure nobody is actually holding i_mutex |
945 | */ | 944 | */ |
@@ -966,6 +965,7 @@ void unlock_new_inode(struct inode *inode) | |||
966 | spin_lock(&inode->i_lock); | 965 | spin_lock(&inode->i_lock); |
967 | WARN_ON(!(inode->i_state & I_NEW)); | 966 | WARN_ON(!(inode->i_state & I_NEW)); |
968 | inode->i_state &= ~I_NEW; | 967 | inode->i_state &= ~I_NEW; |
968 | smp_mb(); | ||
969 | wake_up_bit(&inode->i_state, __I_NEW); | 969 | wake_up_bit(&inode->i_state, __I_NEW); |
970 | spin_unlock(&inode->i_lock); | 970 | spin_unlock(&inode->i_lock); |
971 | } | 971 | } |
@@ -1651,7 +1651,7 @@ __setup("ihash_entries=", set_ihash_entries); | |||
1651 | */ | 1651 | */ |
1652 | void __init inode_init_early(void) | 1652 | void __init inode_init_early(void) |
1653 | { | 1653 | { |
1654 | int loop; | 1654 | unsigned int loop; |
1655 | 1655 | ||
1656 | /* If hashes are distributed across NUMA nodes, defer | 1656 | /* If hashes are distributed across NUMA nodes, defer |
1657 | * hash allocation until vmalloc space is available. | 1657 | * hash allocation until vmalloc space is available. |
@@ -1669,13 +1669,13 @@ void __init inode_init_early(void) | |||
1669 | &i_hash_mask, | 1669 | &i_hash_mask, |
1670 | 0); | 1670 | 0); |
1671 | 1671 | ||
1672 | for (loop = 0; loop < (1 << i_hash_shift); loop++) | 1672 | for (loop = 0; loop < (1U << i_hash_shift); loop++) |
1673 | INIT_HLIST_HEAD(&inode_hashtable[loop]); | 1673 | INIT_HLIST_HEAD(&inode_hashtable[loop]); |
1674 | } | 1674 | } |
1675 | 1675 | ||
1676 | void __init inode_init(void) | 1676 | void __init inode_init(void) |
1677 | { | 1677 | { |
1678 | int loop; | 1678 | unsigned int loop; |
1679 | 1679 | ||
1680 | /* inode slab cache */ | 1680 | /* inode slab cache */ |
1681 | inode_cachep = kmem_cache_create("inode_cache", | 1681 | inode_cachep = kmem_cache_create("inode_cache", |
@@ -1699,7 +1699,7 @@ void __init inode_init(void) | |||
1699 | &i_hash_mask, | 1699 | &i_hash_mask, |
1700 | 0); | 1700 | 0); |
1701 | 1701 | ||
1702 | for (loop = 0; loop < (1 << i_hash_shift); loop++) | 1702 | for (loop = 0; loop < (1U << i_hash_shift); loop++) |
1703 | INIT_HLIST_HEAD(&inode_hashtable[loop]); | 1703 | INIT_HLIST_HEAD(&inode_hashtable[loop]); |
1704 | } | 1704 | } |
1705 | 1705 | ||