Skip to content

Commit 5b13dcc

Browse files
committed
mount.isFUSE(): remove unused error return
The error itself was unused, so may as well remove it. Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 4a6b47d commit 5b13dcc

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

mount/mount_linux.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,20 +106,20 @@ func Unmount(target string, flags int) error {
106106
return nil
107107
}
108108

109-
func isFUSE(dir string) (bool, error) {
109+
func isFUSE(dir string) bool {
110110
// fuseSuperMagic is defined in statfs(2)
111111
const fuseSuperMagic = 0x65735546
112112
var st unix.Statfs_t
113113
if err := unix.Statfs(dir, &st); err != nil {
114-
return false, err
114+
return false
115115
}
116-
return st.Type == fuseSuperMagic, nil
116+
return st.Type == fuseSuperMagic
117117
}
118118

119119
func unmount(target string, flags int) error {
120120
// For FUSE mounts, attempting to execute fusermount helper binary is preferred
121121
// https://github.com/containerd/containerd/pull/3765#discussion_r342083514
122-
if ok, err := isFUSE(target); err == nil && ok {
122+
if isFUSE(target) {
123123
for _, helperBinary := range []string{"fusermount3", "fusermount"} {
124124
cmd := exec.Command(helperBinary, "-u", target)
125125
if err := cmd.Run(); err == nil {

0 commit comments

Comments
 (0)