summaryrefslogtreecommitdiffstats
path: root/fs/ceph/file.c
diff options
context:
space:
mode:
authorYan, Zheng2014-04-01 14:20:17 +0200
committerSage Weil2014-04-05 06:08:23 +0200
commitab866549b3da3eef88e51696bcb24e79f1cc3745 (patch)
tree904ea3edef936ef93a294754d6a14a298cf6518c /fs/ceph/file.c
parentceph: preallocate buffer for readdir reply (diff)
downloadkernel-qcow2-linux-ab866549b3da3eef88e51696bcb24e79f1cc3745.tar.gz
kernel-qcow2-linux-ab866549b3da3eef88e51696bcb24e79f1cc3745.tar.xz
kernel-qcow2-linux-ab866549b3da3eef88e51696bcb24e79f1cc3745.zip
ceph: drop extra open file reference in ceph_atomic_open()
ceph_atomic_open() calls ceph_open() after receiving the MDS reply. ceph_open() grabs an extra open file reference. (The open request already holds an open file reference) Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
Diffstat (limited to 'fs/ceph/file.c')
-rw-r--r--fs/ceph/file.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index 2862a75fb949..66075a4ad979 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -291,8 +291,9 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
}
err = finish_open(file, dentry, ceph_open, opened);
}
-
out_err:
+ if (!req->r_err && req->r_target_inode)
+ ceph_put_fmode(ceph_inode(req->r_target_inode), req->r_fmode);
ceph_mdsc_put_request(req);
dout("atomic_open result=%d\n", err);
return err;