Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go-fuse
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
go-fuse
Commits
f4f9e240
Commit
f4f9e240
authored
Mar 23, 2019
by
Han-Wen Nienhuys
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
splice: more verbose panic if discarding pipe pair fails
parent
6bca9f21
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
splice/pair_linux.go
splice/pair_linux.go
+7
-1
splice/pool.go
splice/pool.go
+0
-1
No files found.
splice/pair_linux.go
View file @
f4f9e240
...
...
@@ -6,6 +6,7 @@ package splice
import
(
"fmt"
"log"
"os"
"syscall"
)
...
...
@@ -43,6 +44,11 @@ func (p *Pair) discard() {
if
err
==
syscall
.
EAGAIN
{
// all good.
}
else
if
err
!=
nil
{
panic
(
err
)
errR
:=
syscall
.
Close
(
p
.
r
)
errW
:=
syscall
.
Close
(
p
.
w
)
// This can happen if something closed our fd
// inadvertently (eg. double close)
log
.
Panicf
(
"splicing into /dev/null: %v (close R %d '%v', close W %d '%v')"
,
err
,
p
.
r
,
errR
,
p
.
w
,
errW
)
}
}
splice/pool.go
View file @
f4f9e240
...
...
@@ -94,7 +94,6 @@ func (pp *pairPool) get() (p *Pair, err error) {
func
(
pp
*
pairPool
)
done
(
p
*
Pair
)
{
p
.
discard
()
pp
.
Lock
()
pp
.
usedCount
--
pp
.
unused
=
append
(
pp
.
unused
,
p
)
...
...
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