lkml.org 
[lkml]   [2002]   [Sep]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
SubjectNTFS: Fixup NTFS after kmap() changes in generic_file_write()
Date
From
Linus, please do a

bk pull http://linux-ntfs.bkbits.net/ntfs-2.5

This is urgent as NTFS will die horribly on highmem boxes without
this patch since it relies on the page already being kmapped in
->prepare/commit_write() and this is no longer the case...

Thanks!

Best regards,

Anton
--
Anton Altaparmakov <aia21 at cantab.net> (replace at with @)
Linux NTFS maintainer / IRC: #ntfs on irc.freenode.net
WWW: http://linux-ntfs.sf.net/, http://www-stu.christs.cam.ac.uk/~aia21/

===================================================================

This will update the following files:

fs/ntfs/aops.c | 24 +++++++++++++++++-------
1 files changed, 17 insertions(+), 7 deletions(-)

through these ChangeSets:

<aia21@cantab.net> (02/09/08 1.575)
NTFS: Pages are no longer kmapped around calls to
->{prepare,commit}_write, adapt NTFS appropriately.


diff -Nru a/fs/ntfs/aops.c b/fs/ntfs/aops.c
--- a/fs/ntfs/aops.c Sun Sep 8 23:07:14 2002
+++ b/fs/ntfs/aops.c Sun Sep 8 23:07:14 2002
@@ -1018,7 +1018,6 @@
ntfs_volume *vol;
run_list_element *rl;
struct buffer_head *bh, *head, *wait[2], **wait_bh = wait;
- char *kaddr = page_address(page);
unsigned int vcn_ofs, block_start, block_end, blocksize;
int err;
BOOL is_retry;
@@ -1267,13 +1266,20 @@
* region. NOTE: This is how we decide if to
* zero or not!
*/
- if (block_end > to)
- memset(kaddr + to, 0, block_end - to);
- if (block_start < from)
- memset(kaddr + block_start, 0,
- from - block_start);
- if (block_end > to || block_start < from)
+ if (block_end > to || block_start < from) {
+ void *kaddr;
+
+ kaddr = kmap_atomic(page, KM_USER0);
+ if (block_end > to)
+ memset(kaddr + to, 0,
+ block_end - to);
+ if (block_start < from)
+ memset(kaddr + block_start, 0,
+ from -
+ block_start);
flush_dcache_page(page);
+ kunmap_atomic(kaddr, KM_USER0);
+ }
continue;
}
}
@@ -1330,10 +1336,14 @@
if (block_start >= to)
break;
if (buffer_new(bh)) {
+ void *kaddr;
+
clear_buffer_new(bh);
if (buffer_uptodate(bh))
buffer_error();
+ kaddr = kmap_atomic(page, KM_USER0);
memset(kaddr + block_start, 0, bh->b_size);
+ kunmap_atomic(kaddr, KM_USER0);
set_buffer_uptodate(bh);
mark_buffer_dirty(bh);
is_retry = TRUE;
===================================================================
This BitKeeper patch contains the following changesets:
aia21@cantab.net|ChangeSet|20020908220434|13926
aia21@cantab.net|ChangeSet|20020908212947|13911
aia21@cantab.net|ChangeSet|20020907104127|04876
aia21@cantab.net|ChangeSet|20020901002342|24934
aia21@cantab.net|ChangeSet|20020831172741|21789
## Wrapped with gzip_uu ##

begin 664 bkpatch31569
M'XL(`!/*>ST``]59:W/;QA7]3/R*G<D7NQ;!?0(+IO(PCI,VXZKUV/6WSGB6
MP(I$2``</*C*0?Y[SP)ZV!)I`8HUG<B2(0+W[+U['^?>A;XCO[R>3^JBW)MM
M4BU,O=X6N5^7)J\R6QL_+K+VQ[7)5_:]K5M.*<<_Q4)!5="R@,JPC5G"F)',
M)I1+'4CO._*ALN5\8E+#&3[]O:CJ^20V>6V6?FYKW'I7%+@U:ZIR5I7Q+*_/
MJRGWE8=';TT=K\G>EM5\PGQQ<Z>^W-GYY-U/?_OPCQ_>>=[I*;FQBYR>>M]V
M"YWIBUN3[RZ@!6-<<D9;CA6H]YHP7X6,4#ZC>B8887K.P[ED+RB;4TKNKD=>
M4#*EWBOR;<W^T8O)F2U7EMRJFM]X>;G9IGGS7^=HDN9U<5#H)A0I24R^2.PR
M-;E?E*M#+@@4YZI5DFD&^6VR7.#'+Y+J&"#D3'(`!(N\-X2S4$?>V5C@V]O(
M>].17YXW*+8A#R5K>_OZV/(NMM&,(LALSL5<\C]S;&]L6Q>9_;IESA^:"JJO
M_#$>S%$J+3(EU*/!G"E-465"/T(SQR\L:+F,Y/@]`QP*[<!"NESMKF=_9)$G
MSMN(,ER$<W6GK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3&
MBTCQT;R%PRE5"K,_R(B/!V.<4P(3E*2C!U8'5GV+CIR3RXMU6>0+:TKD*'9_
MN"`T8A((C!X@F6B4FS0VB)D5R'ZG#^2,AE>%PK#BWA)=3X=)NK+%D>VP"+3L
MCC(B$D/EI3LBX(`Q6!ZCFH[48'DP(]=:\X'RG(J6<V3@8'E,G(C#4'LXFA`3
M$6,@W?YZ-A+WY(2K.4YN*/U>74^XZC/"%7,JYT(>)5SV5(3[SW___'Y.WIJ5
MK8@I+<D+@H57MB2;S.QV-L'=HLD3\.QV6\$`8*8O?]N5%E5A3Z`V2^O?/UZ4
M:6U/B$G,KN[6)`"7Q:Y,36VWEWX?&?Y'6QLUU'M)7KUISZN.Y&>FV%5^W+(H
M=$<`S-HTPG$%Y$.YNVDD9HS$!L(P=7[/K7=7N8D5!X>@A$(5!-T;]2_EW&OU
M1YIP/U,.F:`1.R1G]^H$9=RE2T3O9@L__J*5A60:/DFZC$B4XVF"=;Z6*+W?
M_T6FY47WC<"_O1."1Z3.:TR:C*#V,/=0$GB_X*H(BG&"K_2</%MNBWCST6('
M+YWU;4OZ.U6-UD'^2L[+(GM.?NOD)_LB3<A?-B9)RN^]__3WND_DM//'1U,7
M61H_V\%?)^3-V<</[W]Z1Y]_WTO>5_>\?S#);%;9^EF_U`L\."'TY.K99'*+
MF3K,O=6^,/7PBI\)?K&T@Y#I'4V=&-0X7P6$7VVSR3_;8+?NO1W^#@B.+3WD
JCJ_<$SC>&^HQ)Q]<R3^@^N:/8O':QINJR4YU`.)-EM;['_[7`UG1&P``
`
end
-
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 13:28    [W:0.048 / U:5.260 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site