autofs-5.1.9 - fix table_lookup_ino() fd reference

In table_lookup_ino() checking if the passed in paramter fd is valid is
done incorrectly so fix it.

While we are at, since the fd is an essential result for the most common
(probably the only) use case, fail early if it's NULL. And remove the fd
conditional block because there can be only one matching (device, inode)
entry.

Fixes: 30c05ccb68b4 ("autofs-5.1.9 - add function table_lookup_ino()")
Reported-by: Jeff Moyer jmoyer@redhat.com>
Signed-off-by: Ian Kent <raven@themaw.net>
2 files changed