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
4977b7a1
Commit
4977b7a1
authored
Sep 07, 2004
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] Fix use of AIO wait_on_sync_kiocb and a deadlock in O_SYNC
inode semaphore handling.
parent
25fcf560
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
7 deletions
+10
-7
fs/xfs/linux-2.6/xfs_file.c
fs/xfs/linux-2.6/xfs_file.c
+0
-4
fs/xfs/linux-2.6/xfs_lrw.c
fs/xfs/linux-2.6/xfs_lrw.c
+10
-3
No files found.
fs/xfs/linux-2.6/xfs_file.c
View file @
4977b7a1
...
...
@@ -164,8 +164,6 @@ __linvfs_readv(
if
(
unlikely
(
file
->
f_flags
&
O_DIRECT
))
ioflags
|=
IO_ISDIRECT
;
VOP_READ
(
vp
,
&
kiocb
,
iov
,
nr_segs
,
&
kiocb
.
ki_pos
,
ioflags
,
NULL
,
rval
);
if
(
rval
==
-
EIOCBQUEUED
)
rval
=
wait_on_sync_kiocb
(
&
kiocb
);
*
ppos
=
kiocb
.
ki_pos
;
return
rval
;
...
...
@@ -211,8 +209,6 @@ __linvfs_writev(
ioflags
|=
IO_ISDIRECT
;
VOP_WRITE
(
vp
,
&
kiocb
,
iov
,
nr_segs
,
&
kiocb
.
ki_pos
,
ioflags
,
NULL
,
rval
);
if
(
rval
==
-
EIOCBQUEUED
)
rval
=
wait_on_sync_kiocb
(
&
kiocb
);
*
ppos
=
kiocb
.
ki_pos
;
return
rval
;
...
...
fs/xfs/linux-2.6/xfs_lrw.c
View file @
4977b7a1
...
...
@@ -319,6 +319,8 @@ xfs_read(
xfs_rw_enter_trace
(
XFS_READ_ENTER
,
&
ip
->
i_iocore
,
(
void
*
)
iovp
,
segs
,
*
offset
,
ioflags
);
ret
=
__generic_file_aio_read
(
iocb
,
iovp
,
segs
,
offset
);
if
(
ret
==
-
EIOCBQUEUED
)
ret
=
wait_on_sync_kiocb
(
iocb
);
xfs_iunlock
(
ip
,
XFS_IOLOCK_SHARED
);
if
(
ret
>
0
)
...
...
@@ -846,6 +848,9 @@ xfs_write(
current
->
backing_dev_info
=
NULL
;
if
(
ret
==
-
EIOCBQUEUED
)
ret
=
wait_on_sync_kiocb
(
iocb
);
if
((
ret
==
-
ENOSPC
)
&&
DM_EVENT_ENABLED
(
vp
->
v_vfsp
,
xip
,
DM_EVENT_NOSPACE
)
&&
!
(
ioflags
&
IO_INVIS
))
{
...
...
@@ -953,13 +958,15 @@ xfs_write(
goto
out_unlock_internal
;
}
}
xfs_rwunlock
(
bdp
,
locktype
);
if
(
need_isem
)
up
(
&
inode
->
i_sem
);
error
=
sync_page_range
(
inode
,
mapping
,
pos
,
ret
);
if
(
!
error
)
error
=
-
ret
;
goto
out_unlock_isem
;
error
=
ret
;
return
error
;
}
out_unlock_internal:
...
...
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