client/Client.cc: prevent segfaulting
The segfaulting in the rmdir function is caused by calling
filepath::last_dentry() function.
last_dentry() function assumes that the bits vector has always at
least one element, which is not the case for the the filepath object
created with "/" input.
This commit also fixes other functions affected by this bug:
link, unlink, rename, mkdir, mknod and symlink.
Fixes: http://tracker.ceph.com/issues/9935
Signed-off-by: Michal Jarzabek <stiopa@gmail.com>
(cherry picked from commit
6ed7f2364ae5507bab14c60b582929aa7b0ba400)
Conflicts:
src/client/Client.cc (Client.cc - path_walk(), may_create(), and
_link() take fewer parameters in jewel)
src/test/libcephfs/test.cc (preceding tests are missing in jewel)