Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f0b33df5 authored by Yan, Zheng's avatar Yan, Zheng Committed by Ilya Dryomov
Browse files

ceph: handle -EAGAIN returned by ceph_update_writeable_page()



when ceph_update_writeable_page() return -EAGAIN, caller should
lock the page and call ceph_update_writeable_page() again.

Signed-off-by: default avatarYan, Zheng <zyan@redhat.com>
parent 6ce026e4
Loading
Loading
Loading
Loading
+15 −13
Original line number Diff line number Diff line
@@ -1475,12 +1475,13 @@ static int ceph_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
	/* Update time before taking page lock */
	file_update_time(vma->vm_file);

	do {
		lock_page(page);

		if ((off > size) || (page->mapping != inode->i_mapping)) {
			unlock_page(page);
			ret = VM_FAULT_NOPAGE;
		goto out;
			break;
		}

		ret = ceph_update_writeable_page(vma->vm_file, off, len, page);
@@ -1489,7 +1490,8 @@ static int ceph_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
			set_page_dirty(page);
			ret = VM_FAULT_LOCKED;
		}
out:
	} while (ret == -EAGAIN);

	if (ret == VM_FAULT_LOCKED ||
	    ci->i_inline_version != CEPH_INLINE_NONE) {
		int dirty;