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
nexedi
linux
Commits
121dd68a
Commit
121dd68a
authored
Mar 04, 2003
by
Steve French
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://linux.bkbits.net/linux-2.5
into hostme.bitkeeper.com:/ua/repos/c/cifs/linux-2.5cifs
parents
13d67773
6b29b7bc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
fs/cifs/file.c
fs/cifs/file.c
+8
-4
No files found.
fs/cifs/file.c
View file @
121dd68a
...
@@ -393,7 +393,7 @@ cifs_partialpagewrite(struct page *page,unsigned from, unsigned to)
...
@@ -393,7 +393,7 @@ cifs_partialpagewrite(struct page *page,unsigned from, unsigned to)
{
{
struct
address_space
*
mapping
=
page
->
mapping
;
struct
address_space
*
mapping
=
page
->
mapping
;
loff_t
offset
=
(
loff_t
)
page
->
index
<<
PAGE_CACHE_SHIFT
;
loff_t
offset
=
(
loff_t
)
page
->
index
<<
PAGE_CACHE_SHIFT
;
char
*
write_data
=
kmap
(
page
)
;
char
*
write_data
;
int
rc
=
-
EFAULT
;
int
rc
=
-
EFAULT
;
int
bytes_written
=
0
;
int
bytes_written
=
0
;
struct
cifs_sb_info
*
cifs_sb
;
struct
cifs_sb_info
*
cifs_sb
;
...
@@ -411,8 +411,9 @@ cifs_partialpagewrite(struct page *page,unsigned from, unsigned to)
...
@@ -411,8 +411,9 @@ cifs_partialpagewrite(struct page *page,unsigned from, unsigned to)
/* figure out which file struct to use
/* figure out which file struct to use
if (file->private_data == NULL) {
if (file->private_data == NULL) {
FreeXid(xid);
kunmap(page);
return -EBADF;
FreeXid(xid);
return -EBADF;
}
}
*/
*/
if
(
!
mapping
)
{
if
(
!
mapping
)
{
...
@@ -424,15 +425,17 @@ cifs_partialpagewrite(struct page *page,unsigned from, unsigned to)
...
@@ -424,15 +425,17 @@ cifs_partialpagewrite(struct page *page,unsigned from, unsigned to)
}
}
offset
+=
(
loff_t
)
from
;
offset
+=
(
loff_t
)
from
;
write_data
=
kmap
(
page
);
write_data
+=
from
;
write_data
+=
from
;
if
((
to
>
PAGE_CACHE_SIZE
)
||
(
from
>
to
)
||
(
offset
>
mapping
->
host
->
i_size
))
{
if
((
to
>
PAGE_CACHE_SIZE
)
||
(
from
>
to
)
||
(
offset
>
mapping
->
host
->
i_size
))
{
kunmap
(
page
);
FreeXid
(
xid
);
FreeXid
(
xid
);
return
-
EIO
;
return
-
EIO
;
}
}
/* check to make sure that we are not extending the file */
/* check to make sure that we are not extending the file */
if
(
mapping
->
host
->
i_size
-
offset
<
(
loff_t
)
to
)
if
(
mapping
->
host
->
i_size
-
offset
<
(
loff_t
)
to
)
to
=
(
unsigned
)(
mapping
->
host
->
i_size
-
offset
);
to
=
(
unsigned
)(
mapping
->
host
->
i_size
-
offset
);
...
@@ -459,6 +462,7 @@ cifs_partialpagewrite(struct page *page,unsigned from, unsigned to)
...
@@ -459,6 +462,7 @@ cifs_partialpagewrite(struct page *page,unsigned from, unsigned to)
rc
=
-
EIO
;
rc
=
-
EIO
;
}
}
kunmap
(
page
);
FreeXid
(
xid
);
FreeXid
(
xid
);
return
rc
;
return
rc
;
}
}
...
...
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