ceph: take reference to req->r_parent at point of assignment
[linux-2.6-microblaze.git] / fs / ceph / file.c
index 707102f..d1755ac 100644 (file)
@@ -706,6 +706,7 @@ retry:
                mask |= CEPH_CAP_XATTR_SHARED;
        req->r_args.open.mask = cpu_to_le32(mask);
        req->r_parent = dir;
+       ihold(dir);
 
        if (flags & O_CREAT) {
                struct ceph_file_layout lo;