public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* generic_file_write change in 2.4.0-ac8
@ 2001-01-12 20:26 Chris Mason
  2001-01-12 21:30 ` Alexander Viro
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Mason @ 2001-01-12 20:26 UTC (permalink / raw)
  To: viro, alan; +Cc: linux-kernel


Hi guys,

This code for generic_file_write calls vmtruncate without i_sem held.  Is
that intentional?  It should cause problems for reiserfs at least...

-chris

diff -u --new-file --recursive --exclude-from /usr/src/exclude
linux-2.4.0/mm/filemap.c linux.ac/mm/filemap.c
--- linux-2.4.0/mm/filemap.c	Wed Jan  3 02:59:45 2001
+++ linux.ac/mm/filemap.c	Thu Jan 11 17:26:55 2001
@@ -2578,6 +2625,13 @@
 	ClearPageUptodate(page);
 	kunmap(page);
 	goto unlock;
+sync_failure:
+	UnlockPage(page);
+	deactivate_page(page);
+	page_cache_release(page);
+	if (pos + bytes > inode->i_size)
+		vmtruncate(inode, inode->i_size);
+	goto done;
 }

 

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2001-01-12 21:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-01-12 20:26 generic_file_write change in 2.4.0-ac8 Chris Mason
2001-01-12 21:30 ` Alexander Viro
2001-01-12 21:52   ` Chris Mason

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox