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
50b5551d
Commit
50b5551d
authored
Apr 03, 2014
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
afs: switch to ->write_iter()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
da56e45b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
10 deletions
+8
-10
fs/afs/file.c
fs/afs/file.c
+2
-2
fs/afs/internal.h
fs/afs/internal.h
+1
-2
fs/afs/write.c
fs/afs/write.c
+5
-6
No files found.
fs/afs/file.c
View file @
50b5551d
...
@@ -32,9 +32,9 @@ const struct file_operations afs_file_operations = {
...
@@ -32,9 +32,9 @@ const struct file_operations afs_file_operations = {
.
release
=
afs_release
,
.
release
=
afs_release
,
.
llseek
=
generic_file_llseek
,
.
llseek
=
generic_file_llseek
,
.
read
=
new_sync_read
,
.
read
=
new_sync_read
,
.
write
=
do
_sync_write
,
.
write
=
new
_sync_write
,
.
read_iter
=
generic_file_read_iter
,
.
read_iter
=
generic_file_read_iter
,
.
aio_write
=
afs_file_write
,
.
write_iter
=
afs_file_write
,
.
mmap
=
generic_file_readonly_mmap
,
.
mmap
=
generic_file_readonly_mmap
,
.
splice_read
=
generic_file_splice_read
,
.
splice_read
=
generic_file_splice_read
,
.
fsync
=
afs_fsync
,
.
fsync
=
afs_fsync
,
...
...
fs/afs/internal.h
View file @
50b5551d
...
@@ -747,8 +747,7 @@ extern int afs_write_end(struct file *file, struct address_space *mapping,
...
@@ -747,8 +747,7 @@ extern int afs_write_end(struct file *file, struct address_space *mapping,
extern
int
afs_writepage
(
struct
page
*
,
struct
writeback_control
*
);
extern
int
afs_writepage
(
struct
page
*
,
struct
writeback_control
*
);
extern
int
afs_writepages
(
struct
address_space
*
,
struct
writeback_control
*
);
extern
int
afs_writepages
(
struct
address_space
*
,
struct
writeback_control
*
);
extern
void
afs_pages_written_back
(
struct
afs_vnode
*
,
struct
afs_call
*
);
extern
void
afs_pages_written_back
(
struct
afs_vnode
*
,
struct
afs_call
*
);
extern
ssize_t
afs_file_write
(
struct
kiocb
*
,
const
struct
iovec
*
,
extern
ssize_t
afs_file_write
(
struct
kiocb
*
,
struct
iov_iter
*
);
unsigned
long
,
loff_t
);
extern
int
afs_writeback_all
(
struct
afs_vnode
*
);
extern
int
afs_writeback_all
(
struct
afs_vnode
*
);
extern
int
afs_fsync
(
struct
file
*
,
loff_t
,
loff_t
,
int
);
extern
int
afs_fsync
(
struct
file
*
,
loff_t
,
loff_t
,
int
);
...
...
fs/afs/write.c
View file @
50b5551d
...
@@ -625,15 +625,14 @@ void afs_pages_written_back(struct afs_vnode *vnode, struct afs_call *call)
...
@@ -625,15 +625,14 @@ void afs_pages_written_back(struct afs_vnode *vnode, struct afs_call *call)
/*
/*
* write to an AFS file
* write to an AFS file
*/
*/
ssize_t
afs_file_write
(
struct
kiocb
*
iocb
,
const
struct
iovec
*
iov
,
ssize_t
afs_file_write
(
struct
kiocb
*
iocb
,
struct
iov_iter
*
from
)
unsigned
long
nr_segs
,
loff_t
pos
)
{
{
struct
afs_vnode
*
vnode
=
AFS_FS_I
(
file_inode
(
iocb
->
ki_filp
));
struct
afs_vnode
*
vnode
=
AFS_FS_I
(
file_inode
(
iocb
->
ki_filp
));
ssize_t
result
;
ssize_t
result
;
size_t
count
=
iov_
length
(
iov
,
nr_segs
);
size_t
count
=
iov_
iter_count
(
from
);
_enter
(
"{%x.%u},{%zu},
%lu,
"
,
_enter
(
"{%x.%u},{%zu},"
,
vnode
->
fid
.
vid
,
vnode
->
fid
.
vnode
,
count
,
nr_segs
);
vnode
->
fid
.
vid
,
vnode
->
fid
.
vnode
,
count
);
if
(
IS_SWAPFILE
(
&
vnode
->
vfs_inode
))
{
if
(
IS_SWAPFILE
(
&
vnode
->
vfs_inode
))
{
printk
(
KERN_INFO
printk
(
KERN_INFO
...
@@ -644,7 +643,7 @@ ssize_t afs_file_write(struct kiocb *iocb, const struct iovec *iov,
...
@@ -644,7 +643,7 @@ ssize_t afs_file_write(struct kiocb *iocb, const struct iovec *iov,
if
(
!
count
)
if
(
!
count
)
return
0
;
return
0
;
result
=
generic_file_
aio_write
(
iocb
,
iov
,
nr_segs
,
pos
);
result
=
generic_file_
write_iter
(
iocb
,
from
);
if
(
IS_ERR_VALUE
(
result
))
{
if
(
IS_ERR_VALUE
(
result
))
{
_leave
(
" = %zd"
,
result
);
_leave
(
" = %zd"
,
result
);
return
result
;
return
result
;
...
...
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