client: add an optional Inode ** parm to ceph_readdirplus_r
Ganesha needs an inode reference in addition to the attributes when it
calls readdirplus. Other callers however don't need an inode reference.
We could just take one universally and pass it to the callback, but most
callers don't need that reference and would need to put it in the
callback. That's cumbersome and mutex-thrashy.
So, we need to fix the readdir engine to only conditionally take this
extra reference, when the callback will actually use it. Add a bool to
readdir_r_cb that defaults to false and indicates that the caller wants
an inode reference for each dentry returned. When that bool is true
we'll pass a pointer to the inode to the callback after taking a
reference. Otherwise, NULL is passed to the callback.
Next, add a return double pointer arg to ceph_readdirplus_r that
indicates whether the caller wants an inode reference and where to put
the pointer to the inode. Almost all callers will set that to NULL, but
ganesha can set it to a non-NULL value to get the inode reference that
it wants on each call.