Skip to contentSkip to conversation

kill unneeded code from mm/memory.c

PATCH New Christoph Hellwig 1 participant 1 message Aug 1, 2001

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kill unneeded code from mm/memory.c

Hi Alan,

the attached patch kills a one of the two identical conditionals at the end of vmtruncate. This piece of code is only in -ac, btw.

Please consider applying.

Christoph

Signature · 26 lines
Of course it doesn't work. We've performed a software upgrade.


diff -uNr ../master/linux-2.4.7-ac3/mm/memory.c linux/mm/memory.c
--- ../master/linux-2.4.7-ac3/mm/memory.c	Thu Aug  2 01:48:23 2001
+++ linux/mm/memory.c	Thu Aug  2 01:50:12 2001
@@ -1041,17 +1041,10 @@
 		}
 	}
 	inode->i_size = offset;
-	if (inode->i_op && inode->i_op->truncate)
-	{
-		/* This doesnt scale but it is meant to be a 2.4 invariant */
-		lock_kernel();
-		inode->i_op->truncate(inode);
-		unlock_kernel();
-	}
-	return 0;
-	
+
 out_truncate:
 	if (inode->i_op && inode->i_op->truncate) {
+		/* This doesnt scale but it is meant to be a 2.4 invariant */
 		lock_kernel();
  		inode->i_op->truncate(inode);
 		unlock_kernel();