If we fill the request path from the dentry instead of the inode, we
need to use the dentry inode. This fixes a segfault that would occur
in the case where request->inode is in fact null.
Signed-off-by: Sam Lang <sam.lang@inktank.com>
request->inode->make_nosnap_relative_path(request->path);
else if (request->dentry) {
if (request->dentry->inode)
- request->inode->make_nosnap_relative_path(request->path);
+ request->dentry->inode->make_nosnap_relative_path(request->path);
else if (request->dentry->dir) {
request->dentry->dir->parent_inode->make_nosnap_relative_path(request->path);
request->path.push_dentry(request->dentry->name);