]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/ceph/file.c
ceph: Check for err on mds request in atomic_open
[mirror_ubuntu-bionic-kernel.git] / fs / ceph / file.c
index d415096800a61753e0bac382dff8988176e88a09..2c71cbd78332880e866b72dfd1bc9ff6f40e161a 100644 (file)
@@ -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);