-static int ll_page_mkwrite(struct vm_area_struct *vma, struct page *vmpage)
-{
- int count = 0;
- bool printed = false;
- bool retry;
- int result;
-
- do {
- retry = false;
- result = ll_page_mkwrite0(vma, vmpage, &retry);
-
- if (!printed && ++count > 16) {
- CWARN("app(%s): the page %lu of file %lu is under heavy"
- " contention.\n",
- current->comm, page_index(vmpage),
- vma->vm_file->f_dentry->d_inode->i_ino);
- printed = true;
- }
- } while (retry);
-
- if (result == 0)
- unlock_page(vmpage);
- else if (result == -ENODATA)
- result = 0; /* kernel will know truncate has happened and
- * retry */