summaryrefslogtreecommitdiffstats
path: root/fs/ceph
diff options
context:
space:
mode:
authorYan, Zheng <zyan@redhat.com>2015-01-19 06:23:20 +0100
committerIlya Dryomov <idryomov@gmail.com>2015-02-19 11:31:39 +0100
commitbf91c3150880ed6304f578cf00bd408d642fe6a0 (patch)
tree16c1960ee5f070750e11706498c61de64e11c19a /fs/ceph
parentceph: properly mark empty directory as complete (diff)
downloadlinux-bf91c3150880ed6304f578cf00bd408d642fe6a0.tar.xz
linux-bf91c3150880ed6304f578cf00bd408d642fe6a0.zip
ceph: fix atomic_open snapdir
ceph_handle_snapdir() checks ceph_mdsc_do_request()'s return value and creates snapdir inode if it's -ENOENT Signed-off-by: Yan, Zheng <zyan@redhat.com>
Diffstat (limited to 'fs/ceph')
-rw-r--r--fs/ceph/file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c
index c407abb52b7b..848969ee24db 100644
--- a/fs/ceph/file.c
+++ b/fs/ceph/file.c
@@ -275,10 +275,10 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry,
err = ceph_mdsc_do_request(mdsc,
(flags & (O_CREAT|O_TRUNC)) ? dir : NULL,
req);
+ err = ceph_handle_snapdir(req, dentry, err);
if (err)
goto out_req;
- err = ceph_handle_snapdir(req, dentry, err);
if (err == 0 && (flags & O_CREAT) && !req->r_reply_info.head->is_dentry)
err = ceph_handle_notrace_create(dir, dentry);