Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Yan, Zheng and committed by
Ilya Dryomov
bf91c315 2f92b3d0

+1 -1
+1 -1
fs/ceph/file.c
··· 275 275 err = ceph_mdsc_do_request(mdsc, 276 276 (flags & (O_CREAT|O_TRUNC)) ? dir : NULL, 277 277 req); 278 + err = ceph_handle_snapdir(req, dentry, err); 278 279 if (err) 279 280 goto out_req; 280 281 281 - err = ceph_handle_snapdir(req, dentry, err); 282 282 if (err == 0 && (flags & O_CREAT) && !req->r_reply_info.head->is_dentry) 283 283 err = ceph_handle_notrace_create(dir, dentry); 284 284