Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
7f70e6f2
Commit
7f70e6f2
authored
Sep 09, 2002
by
Anton Altaparmakov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NTFS: Pages are no longer kmapped around calls to
->{prepare,commit}_write, adapt NTFS appropriately.
parent
fd16fd23
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
fs/ntfs/aops.c
fs/ntfs/aops.c
+17
-7
No files found.
fs/ntfs/aops.c
View file @
7f70e6f2
...
...
@@ -1018,7 +1018,6 @@ static int ntfs_prepare_nonresident_write(struct page *page,
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 @@ static int ntfs_prepare_nonresident_write(struct page *page,
* 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 @@ static int ntfs_prepare_nonresident_write(struct page *page,
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
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment