nodefs: Fix FileNotifyStoreCache to return ENOENT when inode is not known to kernel
nodeMap.Handle(&node) == 0 means the kernel does not currently have an entry for this node in its dentry cache. And the kernel would return ENOENT if we would try to send it notify store message with nodeID it does not currently know. So return proper ENOENT when we see that currently there is no handle for the inode, instead of returning EINVAL, which means that call arguments - e.g. off is invalid. NOTE contrary to cache retrieve (where we could turn such error into empty OK read; see previous patch) for cache store we cannot ignore the error. Fixes bdca0e6a (Add support for store notify). See also: https://github.com/hanwen/go-fuse/pull/246#discussion_r242050595
Showing
Please register or sign in to comment