From 96a10572c13acf0a745f85527d79c24cf2de9710 Mon Sep 17 00:00:00 2001 From: Fred Isaman Date: Fri, 20 Apr 2012 14:47:52 -0400 Subject: [PATCH] --- yaml --- r: 308550 b: refs/heads/master c: 84c53ab5c093058c756dcef1879d38be6de90a3c h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/nfs/write.c | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index c4013ee5aa24..df37eece4e38 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 584aa810b6240d88c28113a90c5029449814a3b5 +refs/heads/master: 84c53ab5c093058c756dcef1879d38be6de90a3c diff --git a/trunk/fs/nfs/write.c b/trunk/fs/nfs/write.c index 705bf01cfbba..2500f1cf1996 100644 --- a/trunk/fs/nfs/write.c +++ b/trunk/fs/nfs/write.c @@ -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)