浏览代码

ceph: fix encoding of ino only (not relative) paths

A 'path' consists of a starting ino and relative component.  Encode even
when there is no relative component.  This is primarily needed by the
NFS reexport code.

Signed-off-by: Sage Weil <sage@newdream.net>
Sage Weil 14 年之前
父节点
当前提交
795858dbd2
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/ceph/mds_client.c

+ 1 - 1
fs/ceph/mds_client.c

@@ -1595,7 +1595,7 @@ static int set_request_path_attr(struct inode *rinode, struct dentry *rdentry,
 		r = build_dentry_path(rdentry, ppath, pathlen, ino, freepath);
 		r = build_dentry_path(rdentry, ppath, pathlen, ino, freepath);
 		dout(" dentry %p %llx/%.*s\n", rdentry, *ino, *pathlen,
 		dout(" dentry %p %llx/%.*s\n", rdentry, *ino, *pathlen,
 		     *ppath);
 		     *ppath);
-	} else if (rpath) {
+	} else if (rpath || rino) {
 		*ino = rino;
 		*ino = rino;
 		*ppath = rpath;
 		*ppath = rpath;
 		*pathlen = strlen(rpath);
 		*pathlen = strlen(rpath);