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
bf97f3bc
Commit
bf97f3bc
authored
Apr 03, 2014
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xfs: switch to ->write_iter()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
50b5551d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
20 deletions
+9
-20
fs/xfs/xfs_file.c
fs/xfs/xfs_file.c
+9
-20
No files found.
fs/xfs/xfs_file.c
View file @
bf97f3bc
...
@@ -748,38 +748,29 @@ xfs_file_buffered_aio_write(
...
@@ -748,38 +748,29 @@ xfs_file_buffered_aio_write(
}
}
STATIC
ssize_t
STATIC
ssize_t
xfs_file_
aio_write
(
xfs_file_
write_iter
(
struct
kiocb
*
iocb
,
struct
kiocb
*
iocb
,
const
struct
iovec
*
iovp
,
struct
iov_iter
*
from
)
unsigned
long
nr_segs
,
loff_t
pos
)
{
{
struct
file
*
file
=
iocb
->
ki_filp
;
struct
file
*
file
=
iocb
->
ki_filp
;
struct
address_space
*
mapping
=
file
->
f_mapping
;
struct
address_space
*
mapping
=
file
->
f_mapping
;
struct
inode
*
inode
=
mapping
->
host
;
struct
inode
*
inode
=
mapping
->
host
;
struct
xfs_inode
*
ip
=
XFS_I
(
inode
);
struct
xfs_inode
*
ip
=
XFS_I
(
inode
);
ssize_t
ret
;
ssize_t
ret
;
size_t
ocount
=
0
;
size_t
ocount
=
iov_iter_count
(
from
);
struct
iov_iter
from
;
XFS_STATS_INC
(
xs_write_calls
);
XFS_STATS_INC
(
xs_write_calls
);
BUG_ON
(
iocb
->
ki_pos
!=
pos
);
ocount
=
iov_length
(
iovp
,
nr_segs
);
if
(
ocount
==
0
)
if
(
ocount
==
0
)
return
0
;
return
0
;
iov_iter_init
(
&
from
,
WRITE
,
iovp
,
nr_segs
,
ocount
);
if
(
XFS_FORCED_SHUTDOWN
(
ip
->
i_mount
))
{
if
(
XFS_FORCED_SHUTDOWN
(
ip
->
i_mount
))
ret
=
-
EIO
;
return
-
EIO
;
goto
out
;
}
if
(
unlikely
(
file
->
f_flags
&
O_DIRECT
))
if
(
unlikely
(
file
->
f_flags
&
O_DIRECT
))
ret
=
xfs_file_dio_aio_write
(
iocb
,
&
from
);
ret
=
xfs_file_dio_aio_write
(
iocb
,
from
);
else
else
ret
=
xfs_file_buffered_aio_write
(
iocb
,
&
from
);
ret
=
xfs_file_buffered_aio_write
(
iocb
,
from
);
if
(
ret
>
0
)
{
if
(
ret
>
0
)
{
ssize_t
err
;
ssize_t
err
;
...
@@ -791,8 +782,6 @@ xfs_file_aio_write(
...
@@ -791,8 +782,6 @@ xfs_file_aio_write(
if
(
err
<
0
)
if
(
err
<
0
)
ret
=
err
;
ret
=
err
;
}
}
out:
return
ret
;
return
ret
;
}
}
...
@@ -1449,9 +1438,9 @@ xfs_file_llseek(
...
@@ -1449,9 +1438,9 @@ xfs_file_llseek(
const
struct
file_operations
xfs_file_operations
=
{
const
struct
file_operations
xfs_file_operations
=
{
.
llseek
=
xfs_file_llseek
,
.
llseek
=
xfs_file_llseek
,
.
read
=
new_sync_read
,
.
read
=
new_sync_read
,
.
write
=
do
_sync_write
,
.
write
=
new
_sync_write
,
.
read_iter
=
xfs_file_read_iter
,
.
read_iter
=
xfs_file_read_iter
,
.
aio_write
=
xfs_file_aio_write
,
.
write_iter
=
xfs_file_write_iter
,
.
splice_read
=
xfs_file_splice_read
,
.
splice_read
=
xfs_file_splice_read
,
.
splice_write
=
xfs_file_splice_write
,
.
splice_write
=
xfs_file_splice_write
,
.
unlocked_ioctl
=
xfs_file_ioctl
,
.
unlocked_ioctl
=
xfs_file_ioctl
,
...
...
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