[lkml]   [1999]   [May]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[patch] not perfect ext2 truncate fix included in 2.3.2
I don't agree with the ext2 alternate fix included in 2.3.2.

The point is that we must run run_task_queue() exactly before going to
check if some buffer is still locked (as my original fix did). It make no
sense to run_task_queue() and then go to sleep if our timeslice is not
expired yet, while we could just have all buffers unlocked. According to
me the right fix is:

Index: linux/fs/ext2/truncate.c
RCS file: /var/cvs/linux/fs/ext2/truncate.c,v
retrieving revision
diff -u -r1.1.2.7 truncate.c
--- linux/fs/ext2/truncate.c 1999/05/19 10:08:51
+++ linux/fs/ext2/truncate.c 1999/05/19 16:11:29
@@ -407,9 +407,9 @@
if (IS_SYNC(inode) && (inode->i_state & I_DIRTY))
ext2_sync_inode (inode);
+ if (current->need_resched)
+ schedule();
- current->policy |= SCHED_YIELD;
- schedule();
* If the file is not being truncated to a block boundary, the

Andrea Arcangeli

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:51    [W:0.019 / U:2.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site