Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etercifs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etercifs
Commits
b54f71cf
Commit
b54f71cf
authored
May 28, 2014
by
Pavel Shilovsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update 3.4 sources from stable (v3.4.91)
parent
6acef63e
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
3 deletions
+49
-3
file.c
sources/3.4/file.c
+34
-3
readdir.c
sources/3.4/readdir.c
+8
-0
transport.c
sources/3.4/transport.c
+7
-0
No files found.
sources/3.4/file.c
View file @
b54f71cf
...
...
@@ -2191,7 +2191,7 @@ cifs_iovec_write(struct file *file, const struct iovec *iov,
unsigned
long
nr_segs
,
loff_t
*
poffset
)
{
unsigned
long
nr_pages
,
i
;
size_t
copied
,
len
,
cur_len
;
size_t
bytes
,
copied
,
len
,
cur_len
;
ssize_t
total_written
=
0
;
loff_t
offset
;
struct
iov_iter
it
;
...
...
@@ -2242,14 +2242,45 @@ cifs_iovec_write(struct file *file, const struct iovec *iov,
save_len
=
cur_len
;
for
(
i
=
0
;
i
<
nr_pages
;
i
++
)
{
copied
=
min_t
(
const
size_t
,
cur_len
,
PAGE_SIZE
);
bytes
=
min_t
(
const
size_t
,
cur_len
,
PAGE_SIZE
);
copied
=
iov_iter_copy_from_user
(
wdata
->
pages
[
i
],
&
it
,
0
,
copied
);
0
,
bytes
);
cur_len
-=
copied
;
iov_iter_advance
(
&
it
,
copied
);
/*
* If we didn't copy as much as we expected, then that
* may mean we trod into an unmapped area. Stop copying
* at that point. On the next pass through the big
* loop, we'll likely end up getting a zero-length
* write and bailing out of it.
*/
if
(
copied
<
bytes
)
break
;
}
cur_len
=
save_len
-
cur_len
;
/*
* If we have no data to send, then that probably means that
* the copy above failed altogether. That's most likely because
* the address in the iovec was bogus. Set the rc to -EFAULT,
* free anything we allocated and bail out.
*/
if
(
!
cur_len
)
{
for
(
i
=
0
;
i
<
nr_pages
;
i
++
)
put_page
(
wdata
->
pages
[
i
]);
kfree
(
wdata
);
rc
=
-
EFAULT
;
break
;
}
/*
* i + 1 now represents the number of pages we actually used in
* the copy phase above. Bring nr_pages down to that, and free
* any pages that we didn't use.
*/
for
(
;
nr_pages
>
i
+
1
;
nr_pages
--
)
put_page
(
wdata
->
pages
[
nr_pages
-
1
]);
wdata
->
sync_mode
=
WB_SYNC_ALL
;
wdata
->
nr_pages
=
nr_pages
;
wdata
->
offset
=
(
__u64
)
offset
;
...
...
sources/3.4/readdir.c
View file @
b54f71cf
...
...
@@ -96,6 +96,14 @@ cifs_readdir_lookup(struct dentry *parent, struct qstr *name,
dput
(
dentry
);
}
/*
* If we know that the inode will need to be revalidated immediately,
* then don't create a new dentry for it. We'll end up doing an on
* the wire call either way and this spares us an invalidation.
*/
if
(
fattr
->
cf_flags
&
CIFS_FATTR_NEED_REVAL
)
return
NULL
;
dentry
=
d_alloc
(
parent
,
name
);
if
(
dentry
==
NULL
)
return
NULL
;
...
...
sources/3.4/transport.c
View file @
b54f71cf
...
...
@@ -511,6 +511,13 @@ send_nt_cancel(struct TCP_Server_Info *server, struct smb_hdr *in_buf,
mutex_unlock
(
&
server
->
srv_mutex
);
return
rc
;
}
/*
* The response to this call was already factored into the sequence
* number when the call went out, so we must adjust it back downward
* after signing here.
*/
--
server
->
sequence_number
;
rc
=
smb_send
(
server
,
in_buf
,
be32_to_cpu
(
in_buf
->
smb_buf_length
));
mutex_unlock
(
&
server
->
srv_mutex
);
...
...
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