diff options
author | Alex Elder <elder@inktank.com> | 2013-01-30 14:54:34 +0100 |
---|---|---|
committer | Alex Elder <elder@inktank.com> | 2013-01-30 14:54:34 +0100 |
commit | 969e5aa3b0162a02c4f287d48ff58ca2145acf1b (patch) | |
tree | 1af8e8e47e7352c6d3b4abfdb4aea6bd9458666f /fs/ceph/file.c | |
parent | Linux 3.8-rc5 (diff) | |
parent | libceph: fix undefined behavior when using snprintf() (diff) | |
download | linux-969e5aa3b0162a02c4f287d48ff58ca2145acf1b.tar.xz linux-969e5aa3b0162a02c4f287d48ff58ca2145acf1b.zip |
Merge branch 'testing' of github.com:ceph/ceph-client into v3.8-rc5-testing
Diffstat (limited to 'fs/ceph/file.c')
-rw-r--r-- | fs/ceph/file.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/ceph/file.c b/fs/ceph/file.c index e51558fca3a3..a1e5b81e8118 100644 --- a/fs/ceph/file.c +++ b/fs/ceph/file.c @@ -243,6 +243,9 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry, err = ceph_mdsc_do_request(mdsc, (flags & (O_CREAT|O_TRUNC)) ? dir : NULL, req); + if (err) + goto out_err; + 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); @@ -263,6 +266,9 @@ int ceph_atomic_open(struct inode *dir, struct dentry *dentry, err = finish_no_open(file, dn); } else { dout("atomic_open finish_open on dn %p\n", dn); + if (req->r_op == CEPH_MDS_OP_CREATE && req->r_reply_info.has_create_ino) { + *opened |= FILE_CREATED; + } err = finish_open(file, dentry, ceph_open, opened); } |