diff options
author | Yan, Zheng <zyan@redhat.com> | 2015-01-19 00:23:20 -0500 |
---|---|---|
committer | Ilya Dryomov <idryomov@gmail.com> | 2015-02-19 05:31:39 -0500 |
commit | bf91c3150880ed6304f578cf00bd408d642fe6a0 (patch) | |
tree | 16c1960ee5f070750e11706498c61de64e11c19a /fs | |
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>
Diffstat (limited to 'fs')
-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, | |||
275 | err = ceph_mdsc_do_request(mdsc, | 275 | err = ceph_mdsc_do_request(mdsc, |
276 | (flags & (O_CREAT|O_TRUNC)) ? dir : NULL, | 276 | (flags & (O_CREAT|O_TRUNC)) ? dir : NULL, |
277 | req); | 277 | req); |
278 | err = ceph_handle_snapdir(req, dentry, err); | ||
278 | if (err) | 279 | if (err) |
279 | goto out_req; | 280 | goto out_req; |
280 | 281 | ||
281 | err = ceph_handle_snapdir(req, dentry, err); | ||
282 | if (err == 0 && (flags & O_CREAT) && !req->r_reply_info.head->is_dentry) | 282 | if (err == 0 && (flags & O_CREAT) && !req->r_reply_info.head->is_dentry) |
283 | err = ceph_handle_notrace_create(dir, dentry); | 283 | err = ceph_handle_notrace_create(dir, dentry); |
284 | 284 | ||