diff options
author | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2016-01-19 20:37:30 +0100 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2016-05-17 21:47:55 +0200 |
commit | 67911c8f18b595040f5c2df0550c69a7c9397891 (patch) | |
tree | 11583f0793161d5bb0632ff1c45d14b81b24c89a /fs/nfs/pagelist.c | |
parent | Fixing oops in callback path (diff) | |
download | linux-67911c8f18b595040f5c2df0550c69a7c9397891.tar.xz linux-67911c8f18b595040f5c2df0550c69a7c9397891.zip |
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>
Diffstat (limited to 'fs/nfs/pagelist.c')
-rw-r--r-- | fs/nfs/pagelist.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nfs/pagelist.c b/fs/nfs/pagelist.c index 1f6db4231057..174dd4cf5747 100644 --- a/fs/nfs/pagelist.c +++ b/fs/nfs/pagelist.c @@ -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; |