File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
119119func 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 {
You can’t perform that action at this time.
0 commit comments