int ntfs_writepage (struct page * page, struct writeback_control * wbc);
This is called from the VM when it wants to have a dirty ntfs page cache page cleaned. The VM has already locked the page and marked it clean.
For non-resident attributes, ntfs_writepage writes the page by calling the ntfs version of the generic block_write_full_page function, ntfs_write_block, which in turn if necessary creates and writes the buffers associated with the page asynchronously.
For resident attributes, OTOH, ntfs_writepage writes the page by copying the data to the mft record (which at this stage is most likely in memory). The mft record is then marked dirty and written out asynchronously via the vfs inode dirty code path for the inode the mft record belongs to or via the vm page dirty code path for the page the mft record is in.
Based on ntfs_readpage and fs/buffer.c::block_write_full_page.
Return 0 on success and -errno on error.