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

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

Advertisement

Kernel v2.4.1 /fs/inode.c

Filename:/fs/inode.c
Lines Added:21
Lines Deleted:1
Also changed in: (Previous) 2.4.1-pre12  2.4.1-pre11  2.4.1-pre10  2.4.1-pre9  2.4.1-pre8  2.4.1-pre6 
(Following) 2.4.1-ac1  2.4.1-ac2  2.4.1-ac3  2.4.1-ac4  2.4.1-ac5  2.4.1-ac6 

Location
[  2.4.1
  [  fs
     o  inode.c

Patch

diff -u --recursive --new-file v2.4.0/linux/fs/inode.c linux/fs/inode.c
--- v2.4.0/linux/fs/inode.c   Fri Dec 29 15:35:42 2000
+++ linux/fs/inode.c   Mon Jan 15 18:20:14 2001
@@ -136,6 +136,16 @@
    struct super_block * sb = inode->i_sb;
 
    if (sb) {
+      /* Don't do this for I_DIRTY_PAGES - that doesn't actually dirty the inode itself */
+      if (flags & (I_DIRTY | I_DIRTY_SYNC)) {
+         if (sb->s_op && sb->s_op->dirty_inode)
+            sb->s_op->dirty_inode(inode);
+      }
+
+      /* avoid the locking if we can */
+      if ((inode->i_state & flags) == flags)
+         return;
+
       spin_lock(&inode_lock);
       if ((inode->i_state & flags) != flags) {
          inode->i_state |= flags;
@@ -676,7 +686,17 @@
          spin_unlock(&inode_lock);
 
          clean_inode(inode);
-         sb->s_op->read_inode(inode);
+
+         /* reiserfs specific hack right here.  We don't
+         ** want this to last, and are looking for VFS changes
+         ** that will allow us to get rid of it.
+         ** -- mason@suse.com 
+         */
+         if (sb->s_op->read_inode2) {
+            sb->s_op->read_inode2(inode, opaque) ;
+         } else {
+            sb->s_op->read_inode(inode);
+         }
 
          /*
           * This is special!  We do not need the spinlock


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