patch-2.4.1 linux/fs/inode.c

Next file: linux/fs/ncpfs/dir.c
Previous file: linux/fs/hpfs/inode.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.4.0/linux/fs/inode.c linux/fs/inode.c
@@ -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

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)