| Kernel v2.4.15-pre8 /fs/inode.c |
|---|
 2.4.15-pre8
 fs
 inode.c
diff -u --recursive --new-file v2.4.14/linux/fs/inode.c linux/fs/inode.c
--- v2.4.14/linux/fs/inode.c Tue Oct 9 17:06:53 2001
+++ linux/fs/inode.c Tue Nov 20 14:12:42 2001
@@ -66,7 +66,7 @@
* NOTE! You also have to own the lock if you change
* the i_state of an inode while it is in use..
*/
-spinlock_t inode_lock = SPIN_LOCK_UNLOCKED;
+static spinlock_t inode_lock = SPIN_LOCK_UNLOCKED;
/*
* Statistics gathering..
@@ -404,6 +404,8 @@
spin_lock(&sb_lock);
sb = sb_entry(super_blocks.next);
for (; nr_inodes && sb != sb_entry(&super_blocks); sb = sb_entry(sb->s_list.next)) {
+ if (list_empty(&sb->s_dirty))
+ continue;
spin_unlock(&sb_lock);
nr_inodes = try_to_sync_unused_list(&sb->s_dirty, nr_inodes);
spin_lock(&sb_lock);
@@ -678,11 +680,11 @@
entry = entry->prev;
inode = INODE(tmp);
if (inode->i_state & (I_FREEING|I_CLEAR|I_LOCK))
- BUG();
+ continue;
if (!CAN_UNUSE(inode))
continue;
if (atomic_read(&inode->i_count))
- BUG();
+ continue;
list_del(tmp);
list_del(&inode->i_hash);
INIT_LIST_HEAD(&inode->i_hash);
@@ -957,8 +959,6 @@
*/
inode = NULL;
spin_unlock(&inode_lock);
- if (inode)
- wait_on_inode(inode);
return inode;
}
|