Commit 8ccb625b authored by Kirill Smelkov's avatar Kirill Smelkov Committed by Han-Wen Nienhuys

fuse: Fix thinko in SupportsVersion

Current code was requiring that both

	in.Major >= maj		_and_
	in.Minor >= min

this way e.g. kernel's 7.27 would satisfy requirement of e.g. 7.25, but
8.1 won't do. Fix it.
parent 19ad26b9
...@@ -555,7 +555,7 @@ func (ms *Server) EntryNotify(parent uint64, name string) Status { ...@@ -555,7 +555,7 @@ func (ms *Server) EntryNotify(parent uint64, name string) Status {
// SupportsVersion returns true if the kernel supports the given // SupportsVersion returns true if the kernel supports the given
// protocol version or newer. // protocol version or newer.
func (in *InitIn) SupportsVersion(maj, min uint32) bool { func (in *InitIn) SupportsVersion(maj, min uint32) bool {
return in.Major >= maj && in.Minor >= min return in.Major >= maj || (in.Major == maj && in.Minor >= min)
} }
// SupportsNotify returns whether a certain notification type is // SupportsNotify returns whether a certain notification type is
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment