Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

Advertisement
[ Kernel ] [ Documentation ] [ Links ] [ Books ]

Kernel v2.4.15-pre8 /fs/inode.c

Filename:/fs/inode.c
Lines Added:5
Lines Deleted:5
Also changed in: (Previous) 2.4.15-pre7  2.4.15-pre6  2.4.13-ac8  2.4.13-ac7  2.4.13-ac6  2.4.13-ac5 
(Following) 2.4.15-pre9  2.4.15-greased-turkey  2.4.16-pre1  2.4.16  2.4.17-pre3  2.4.17-pre4 

Location
[  2.4.15-pre8
  [  fs
     o  inode.c

Patch

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;
 }
 


Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.