NFS: Add nfs_commit_file()

Copy will use this to set up a commit request for a generic range.  I
don't want to allocate a new pagecache entry for the file, so I needed
to change parts of the commit path to handle requests with a null
wb_page.

Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
This commit is contained in:
Anna Schumaker
2016-01-19 14:37:30 -05:00
bovenliggende c2985d001d
commit 67911c8f18
3 gewijzigde bestanden met toevoegingen van 42 en 6 verwijderingen

Bestand weergeven

@@ -341,8 +341,10 @@ nfs_create_request(struct nfs_open_context *ctx, struct page *page,
* long write-back delay. This will be adjusted in
* update_nfs_request below if the region is not locked. */
req->wb_page = page;
req->wb_index = page_file_index(page);
get_page(page);
if (page) {
req->wb_index = page_file_index(page);
get_page(page);
}
req->wb_offset = offset;
req->wb_pgbase = offset;
req->wb_bytes = count;