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
b4f5d2c6
Commit
b4f5d2c6
authored
Apr 02, 2014
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xfs: switch to ->read_iter()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
aad4f8bb
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
12 deletions
+7
-12
fs/xfs/xfs_file.c
fs/xfs/xfs_file.c
+7
-12
No files found.
fs/xfs/xfs_file.c
View file @
b4f5d2c6
...
...
@@ -229,32 +229,27 @@ xfs_file_fsync(
}
STATIC
ssize_t
xfs_file_
aio_read
(
xfs_file_
read_iter
(
struct
kiocb
*
iocb
,
const
struct
iovec
*
iovp
,
unsigned
long
nr_segs
,
loff_t
pos
)
struct
iov_iter
*
to
)
{
struct
file
*
file
=
iocb
->
ki_filp
;
struct
inode
*
inode
=
file
->
f_mapping
->
host
;
struct
xfs_inode
*
ip
=
XFS_I
(
inode
);
struct
xfs_mount
*
mp
=
ip
->
i_mount
;
size_t
size
=
0
;
size_t
size
=
iov_iter_count
(
to
)
;
ssize_t
ret
=
0
;
int
ioflags
=
0
;
xfs_fsize_t
n
;
loff_t
pos
=
iocb
->
ki_pos
;
XFS_STATS_INC
(
xs_read_calls
);
BUG_ON
(
iocb
->
ki_pos
!=
pos
);
if
(
unlikely
(
file
->
f_flags
&
O_DIRECT
))
ioflags
|=
IO_ISDIRECT
;
if
(
file
->
f_mode
&
FMODE_NOCMTIME
)
ioflags
|=
IO_INVIS
;
size
=
iov_length
(
iovp
,
nr_segs
);
if
(
unlikely
(
ioflags
&
IO_ISDIRECT
))
{
xfs_buftarg_t
*
target
=
XFS_IS_REALTIME_INODE
(
ip
)
?
...
...
@@ -307,7 +302,7 @@ xfs_file_aio_read(
trace_xfs_file_read
(
ip
,
size
,
pos
,
ioflags
);
ret
=
generic_file_
aio_read
(
iocb
,
iovp
,
nr_segs
,
pos
);
ret
=
generic_file_
read_iter
(
iocb
,
to
);
if
(
ret
>
0
)
XFS_STATS_ADD
(
xs_read_bytes
,
ret
);
...
...
@@ -1453,9 +1448,9 @@ xfs_file_llseek(
const
struct
file_operations
xfs_file_operations
=
{
.
llseek
=
xfs_file_llseek
,
.
read
=
do
_sync_read
,
.
read
=
new
_sync_read
,
.
write
=
do_sync_write
,
.
aio_read
=
xfs_file_aio_read
,
.
read_iter
=
xfs_file_read_iter
,
.
aio_write
=
xfs_file_aio_write
,
.
splice_read
=
xfs_file_splice_read
,
.
splice_write
=
xfs_file_splice_write
,
...
...
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