if (unlikely(nilfs_near_disk_full(inode->i_sb->s_fs_info))) return VM_FAULT_SIGBUS; /* -ENOSPC */
sb_start_pagefault(inode->i_sb);
folio_lock(folio); if (folio->mapping != inode->i_mapping ||
folio_pos(folio) >= i_size_read(inode) ||
!folio_test_uptodate(folio)) {
folio_unlock(folio);
ret = -EFAULT; /* make the VM retry the fault */ goto out;
}
/* *checktoseeifthefolioismappedalready(noholes)
*/ if (folio_test_mappedtodisk(folio)) goto mapped;
head = folio_buffers(folio); if (head) { int fully_mapped = 1;
bh = head; do { if (!buffer_mapped(bh)) {
fully_mapped = 0; break;
}
} while (bh = bh->b_this_page, bh != head);
if (fully_mapped) {
folio_set_mappedtodisk(folio); goto mapped;
}
}
folio_unlock(folio);
/* *fillholeblocks
*/
ret = nilfs_transaction_begin(inode->i_sb, &ti, 1); /* never returns -ENOMEM, but may return -ENOSPC */ if (unlikely(ret)) goto out;
file_update_time(vma->vm_file);
ret = block_page_mkwrite(vma, vmf, nilfs_get_block); if (ret) {
nilfs_transaction_abort(inode->i_sb); goto out;
}
nilfs_set_file_dirty(inode, 1 << (PAGE_SHIFT - inode->i_blkbits));
nilfs_transaction_commit(inode->i_sb);
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.