Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 84c53ab5 authored by Fred Isaman's avatar Fred Isaman Committed by Trond Myklebust
Browse files

NFS: create nfs_generic_commit_list



Simple refactoring.

Signed-off-by: default avatarFred Isaman <iisaman@netapp.com>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 584aa810
Loading
Loading
Loading
Loading
+12 −3
Original line number Diff line number Diff line
@@ -1523,6 +1523,17 @@ static const struct rpc_call_ops nfs_commit_ops = {
	.rpc_release = nfs_commit_release,
};

static int nfs_generic_commit_list(struct inode *inode, struct list_head *head,
				   int how)
{
	int status;

	status = pnfs_commit_list(inode, head, how);
	if (status == PNFS_NOT_ATTEMPTED)
		status = nfs_commit_list(inode, head, how);
	return status;
}

int nfs_commit_inode(struct inode *inode, int how)
{
	LIST_HEAD(head);
@@ -1536,9 +1547,7 @@ int nfs_commit_inode(struct inode *inode, int how)
	if (res) {
		int error;

		error = pnfs_commit_list(inode, &head, how);
		if (error == PNFS_NOT_ATTEMPTED)
			error = nfs_commit_list(inode, &head, how);
		error = nfs_generic_commit_list(inode, &head, how);
		if (error < 0)
			return error;
		if (!may_wait)