X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=fs%2Fceph%2Fmds_client.c;h=068b029cf07390d1495ae3feffa1fb16d3c5872d;hb=f89d416a8676fe36de8be0f7c2e1ac6cd51410a8;hp=a5163296d9d9b10518a1942ee95c2a96f2301cf6;hpb=2df08822a643558402b7c58528b8478e31e40ad7;p=linux-2.6-microblaze.git diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index a5163296d9d9..068b029cf073 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -2182,13 +2182,17 @@ retry: } base = ceph_ino(d_inode(temp)); rcu_read_unlock(); - if (pos < 0 || read_seqretry(&rename_lock, seq)) { - pr_err("build_path did not end path lookup where " - "expected, pos is %d\n", pos); - /* presumably this is only possible if racing with a - rename of one of the parent directories (we can not - lock the dentries above us to prevent this, but - retrying should be harmless) */ + + if (read_seqretry(&rename_lock, seq)) + goto retry; + + if (pos < 0) { + /* + * A rename didn't occur, but somehow we didn't end up where + * we thought we would. Throw a warning and try again. + */ + pr_warn("build_path did not end path lookup where " + "expected, pos is %d\n", pos); goto retry; } @@ -2345,6 +2349,7 @@ static struct ceph_msg *create_request_message(struct ceph_mds_client *mdsc, head->op = cpu_to_le32(req->r_op); head->caller_uid = cpu_to_le32(from_kuid(&init_user_ns, req->r_uid)); head->caller_gid = cpu_to_le32(from_kgid(&init_user_ns, req->r_gid)); + head->ino = 0; head->args = req->r_args; ceph_encode_filepath(&p, end, ino1, path1);