diff options
author | Yan, Zheng | 2015-01-19 13:23:20 +0800 |
---|---|---|
committer | Ilya Dryomov | 2015-02-19 13:31:39 +0300 |
commit | bf91c3150880ed6304f578cf00bd408d642fe6a0 (patch) | |
tree | 16c1960ee5f070750e11706498c61de64e11c19a | |
parent | 2f92b3d0a9a583a5a4dd786a84fc42e6f1aa40fa (diff) |
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>
-rw-r--r-- | fs/ceph/file.c | 2 |
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); |