Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
ext3/4 with synchronous writes gets wedged by Postfix
Fix nobh_truncate_page() to not pass stack garbage to get_block()

+27 -6
+2
fs/buffer.c
··· 2736 2736 pos += blocksize; 2737 2737 } 2738 2738 2739 + map_bh.b_size = blocksize; 2740 + map_bh.b_state = 0; 2739 2741 err = get_block(inode, iblock, &map_bh, 0); 2740 2742 if (err) 2741 2743 goto unlock;
+25 -6
fs/inode.c
··· 1053 1053 struct super_block *sb = inode->i_sb; 1054 1054 ino_t ino = inode->i_ino; 1055 1055 struct hlist_head *head = inode_hashtable + hash(sb, ino); 1056 - struct inode *old; 1057 1056 1058 1057 inode->i_state |= I_LOCK|I_NEW; 1059 1058 while (1) { 1059 + struct hlist_node *node; 1060 + struct inode *old = NULL; 1060 1061 spin_lock(&inode_lock); 1061 - old = find_inode_fast(sb, head, ino); 1062 - if (likely(!old)) { 1062 + hlist_for_each_entry(old, node, head, i_hash) { 1063 + if (old->i_ino != ino) 1064 + continue; 1065 + if (old->i_sb != sb) 1066 + continue; 1067 + if (old->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE)) 1068 + continue; 1069 + break; 1070 + } 1071 + if (likely(!node)) { 1063 1072 hlist_add_head(&inode->i_hash, head); 1064 1073 spin_unlock(&inode_lock); 1065 1074 return 0; ··· 1090 1081 { 1091 1082 struct super_block *sb = inode->i_sb; 1092 1083 struct hlist_head *head = inode_hashtable + hash(sb, hashval); 1093 - struct inode *old; 1094 1084 1095 1085 inode->i_state |= I_LOCK|I_NEW; 1096 1086 1097 1087 while (1) { 1088 + struct hlist_node *node; 1089 + struct inode *old = NULL; 1090 + 1098 1091 spin_lock(&inode_lock); 1099 - old = find_inode(sb, head, test, data); 1100 - if (likely(!old)) { 1092 + hlist_for_each_entry(old, node, head, i_hash) { 1093 + if (old->i_sb != sb) 1094 + continue; 1095 + if (!test(old, data)) 1096 + continue; 1097 + if (old->i_state & (I_FREEING|I_CLEAR|I_WILL_FREE)) 1098 + continue; 1099 + break; 1100 + } 1101 + if (likely(!node)) { 1101 1102 hlist_add_head(&inode->i_hash, head); 1102 1103 spin_unlock(&inode_lock); 1103 1104 return 0;