lkml.org 
[lkml]   [2004]   [Oct]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH 25/37] Re: [2.6-BK-URL] NTFS: 2.1.21 - Big update with race/bug fixes
This is patch 25/37 in the series.  It contains the following ChangeSet:

<aia21@cantab.net> (04/10/12 1.2041.1.3)
NTFS: Map the page instead of using page_address() before writing to it in
fs/ntfs/aops.c::ntfs_mft_writepage().

Signed-off-by: Anton Altaparmakov <aia21@cantab.net>

Best regards,

Anton
--
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Unix Support, Computing Service, University of Cambridge, CB2 3QH, UK
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/, http://www-stu.christs.cam.ac.uk/~aia21/

===================================================================
diff -Nru a/fs/ntfs/ChangeLog b/fs/ntfs/ChangeLog
--- a/fs/ntfs/ChangeLog 2004-10-19 10:14:36 +01:00
+++ b/fs/ntfs/ChangeLog 2004-10-19 10:14:36 +01:00
@@ -80,6 +80,8 @@
the bug check from fs/ntfs/aops.c::ntfs_write_mst_block(). It is in
fact required to write outside initialized size when preparing to
extend the initialized size.
+ - Map the page instead of using page_address() before writing to it in
+ fs/ntfs/aops.c::ntfs_mft_writepage().

2.1.20 - Fix two stupid bugs introduced in 2.1.18 release.

diff -Nru a/fs/ntfs/aops.c b/fs/ntfs/aops.c
--- a/fs/ntfs/aops.c 2004-10-19 10:14:36 +01:00
+++ b/fs/ntfs/aops.c 2004-10-19 10:14:36 +01:00
@@ -917,7 +917,7 @@
if (!nr_bhs)
goto done;
/* Apply the mst protection fixups. */
- kaddr = page_address(page);
+ kaddr = kmap(page);
for (i = 0; i < nr_bhs; i++) {
if (!(i % bhs_per_rec)) {
err = pre_write_mst_fixup((NTFS_RECORD*)(kaddr +
@@ -974,6 +974,7 @@
bh_offset(bhs[i])));
}
flush_dcache_page(page);
+ kunmap(page);
if (unlikely(err)) {
/* I/O error during writing. This is really bad! */
ntfs_error(vol->sb, "I/O error while writing ntfs record "
@@ -996,6 +997,7 @@
post_write_mst_fixup((NTFS_RECORD*)(kaddr +
bh_offset(bhs[i])));
}
+ kunmap(page);
cleanup_out:
/* Clean the buffers. */
for (i = 0; i < nr_bhs; i++)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:07    [from the cache]
©2003-2011 Jasper Spaans