linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Fred Isaman <iisaman@netapp.com>
To: linux-nfs@vger.kernel.org
Subject: [PATCH 3/4] pnfs_submit: simplify nfs4_callback_layoutrecall
Date: Wed,  6 Oct 2010 16:35:16 -0400	[thread overview]
Message-ID: <1286397317-17881-4-git-send-email-iisaman@netapp.com> (raw)
In-Reply-To: <1286397317-17881-1-git-send-email-iisaman@netapp.com>

The code in the two branches was identical, so remove the if statement.

Signed-off-by: Fred Isaman <iisaman@netapp.com>
---
 fs/nfs/callback_proc.c |   29 ++++++++++-------------------
 1 files changed, 10 insertions(+), 19 deletions(-)

diff --git a/fs/nfs/callback_proc.c b/fs/nfs/callback_proc.c
index fa0ca0c..5a996b5 100644
--- a/fs/nfs/callback_proc.c
+++ b/fs/nfs/callback_proc.c
@@ -370,25 +370,16 @@ __be32 nfs4_callback_layoutrecall(struct cb_layoutrecallargs *args,
 		/* the callback must come from the MDS personality */
 		if (!(clp->cl_exchange_flags & EXCHGID4_FLAG_USE_PNFS_MDS))
 			goto loop;
-		if (args->cbl_recall_type == RETURN_FILE) {
-			inode = nfs_layoutrecall_find_inode(clp, args);
-			if (inode != NULL) {
-				status = pnfs_async_return_layout(clp, inode,
-								  args);
-				if (status)
-					res = cpu_to_be32(NFS4ERR_DELAY);
-				iput(inode);
-			}
-		} else { /* _ALL or _FSID */
-			/* we need the inode to get the nfs_server struct */
-			inode = nfs_layoutrecall_find_inode(clp, args);
-			if (!inode)
-				goto loop;
-			status = pnfs_async_return_layout(clp, inode, args);
-			if (status)
-				res = cpu_to_be32(NFS4ERR_DELAY);
-			iput(inode);
-		}
+		/* In the _ALL or _FSID case, we need the inode to get
+		 * the nfs_server struct.
+		 */
+		inode = nfs_layoutrecall_find_inode(clp, args);
+		if (!inode)
+			goto loop;
+		status = pnfs_async_return_layout(clp, inode, args);
+		if (status)
+			res = cpu_to_be32(NFS4ERR_DELAY);
+		iput(inode);
 loop:
 		clp = nfs_find_client_next(prev);
 		nfs_put_client(prev);
-- 
1.7.2.1


  parent reply	other threads:[~2010-10-07 13:11 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-06 20:35 [PATCH 0/4] pnfs-submit: misc fixes in CB_LAYOUTRECALL and layout stateid code Fred Isaman
2010-10-06 20:35 ` [PATCH 1/4] pnfs_submit: Remove nonsensical check Fred Isaman
2010-10-06 20:35 ` [PATCH 2/4] pnfs_submit: Only update stateid if it is more recent than current Fred Isaman
2010-10-07 13:34   ` Benny Halevy
2010-10-07 14:01     ` Fred Isaman
2010-10-07 14:06       ` Benny Halevy
2010-10-08 14:13         ` P.B.Shelley
2010-10-08 14:16           ` Benny Halevy
2010-10-08 14:35           ` Fred Isaman
2010-10-08 15:36             ` P.B.Shelley
2010-10-08 15:52               ` Fred Isaman
2010-10-06 20:35 ` Fred Isaman [this message]
2010-10-06 20:35 ` [PATCH 4/4] pnfs_submit: Fix clp refcounting in layout recalls Fred Isaman
2010-10-07 15:32 ` [PATCH 0/4] pnfs-submit: misc fixes in CB_LAYOUTRECALL and layout stateid code Benny Halevy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1286397317-17881-4-git-send-email-iisaman@netapp.com \
    --to=iisaman@netapp.com \
    --cc=linux-nfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).