NFS/pNFS: Refactor pnfs_generic_commit_pagelist()
Refactor pnfs_generic_commit_pagelist() to simplify the conversion to layout segment based commit lists. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
@@ -1746,14 +1746,19 @@ void nfs_init_commit(struct nfs_commit_data *data,
|
||||
struct pnfs_layout_segment *lseg,
|
||||
struct nfs_commit_info *cinfo)
|
||||
{
|
||||
struct nfs_page *first = nfs_list_entry(head->next);
|
||||
struct nfs_open_context *ctx = nfs_req_openctx(first);
|
||||
struct inode *inode = d_inode(ctx->dentry);
|
||||
struct nfs_page *first;
|
||||
struct nfs_open_context *ctx;
|
||||
struct inode *inode;
|
||||
|
||||
/* Set up the RPC argument and reply structs
|
||||
* NB: take care not to mess about with data->commit et al. */
|
||||
|
||||
list_splice_init(head, &data->pages);
|
||||
if (head)
|
||||
list_splice_init(head, &data->pages);
|
||||
|
||||
first = nfs_list_entry(data->pages.next);
|
||||
ctx = nfs_req_openctx(first);
|
||||
inode = d_inode(ctx->dentry);
|
||||
|
||||
data->inode = inode;
|
||||
data->cred = ctx->cred;
|
||||
|
Reference in New Issue
Block a user