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
0165e810
Commit
0165e810
authored
Feb 04, 2014
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fold cifs_iovec_read() into its (only) caller
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
7f25bba8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
18 deletions
+9
-18
fs/cifs/file.c
fs/cifs/file.c
+9
-18
No files found.
fs/cifs/file.c
View file @
0165e810
...
...
@@ -2808,14 +2808,14 @@ cifs_uncached_read_into_pages(struct TCP_Server_Info *server,
return
total_read
>
0
?
total_read
:
result
;
}
static
ssize_t
cifs_iovec_read
(
struct
file
*
file
,
const
struct
iovec
*
iov
,
unsigned
long
nr_segs
,
loff_t
*
poffset
)
ssize_t
cifs_user_readv
(
struct
kiocb
*
iocb
,
const
struct
iovec
*
iov
,
unsigned
long
nr_segs
,
loff_t
pos
)
{
struct
file
*
file
=
iocb
->
ki_filp
;
ssize_t
rc
;
size_t
len
,
cur_len
;
ssize_t
total_read
=
0
;
loff_t
offset
=
*
poffset
;
loff_t
offset
=
pos
;
unsigned
int
npages
;
struct
cifs_sb_info
*
cifs_sb
;
struct
cifs_tcon
*
tcon
;
...
...
@@ -2919,25 +2919,16 @@ cifs_iovec_read(struct file *file, const struct iovec *iov,
total_read
=
len
-
iov_iter_count
(
&
to
);
cifs_stats_bytes_read
(
tcon
,
total_read
);
*
poffset
+=
total_read
;
/* mask nodata case */
if
(
rc
==
-
ENODATA
)
rc
=
0
;
return
total_read
?
total_read
:
rc
;
}
ssize_t
cifs_user_readv
(
struct
kiocb
*
iocb
,
const
struct
iovec
*
iov
,
unsigned
long
nr_segs
,
loff_t
pos
)
{
ssize_t
read
;
read
=
cifs_iovec_read
(
iocb
->
ki_filp
,
iov
,
nr_segs
,
&
pos
);
if
(
read
>
0
)
iocb
->
ki_pos
=
pos
;
return
read
;
if
(
total_read
)
{
iocb
->
ki_pos
=
pos
+
total_read
;
return
total_read
;
}
return
rc
;
}
ssize_t
...
...
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