public inbox for linux-nfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Wenle Chen <solomonchenclever@gmail.com>
To: trond.myklebust@hammerspace.com, anna.schumaker@netapp.com
Cc: linux-nfs@vger.kernel.org, linux-kernel@vger.kernel.org,
	chenwenle@huawei.com, solachenclever@hotmail.com,
	nixiaoming@huawei.com, solachenclever@gmail.com
Subject: [PATCH 1/2] NFS: Reduce redundant comparison
Date: Tue,  3 Nov 2020 00:24:37 +0800	[thread overview]
Message-ID: <20201102162438.14034-2-chenwenle@huawei.com> (raw)
In-Reply-To: <20201102162438.14034-1-chenwenle@huawei.com>

  The err wouldn't be change after sleep. There is no need
to compare err and -NFS4ERR_DELAY

Signed-off-by: Wenle Chen <chenwenle@huawei.com>
---
 fs/nfs/nfs4proc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 9e0ca9b2b210..f6b5dc792b33 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -7399,7 +7399,7 @@ int nfs4_lock_delegation_recall(struct file_lock *fl, struct nfs4_state *state,
 		if (err != -NFS4ERR_DELAY)
 			break;
 		ssleep(1);
-	} while (err == -NFS4ERR_DELAY);
+	} while (1);
 	return nfs4_handle_delegation_recall_error(server, state, stateid, fl, err);
 }
 
-- 
2.29.1


  reply	other threads:[~2020-11-02 16:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-02 16:24 [PATCH 0/2] NFS: Delay Retry Proposed Changes Wenle Chen
2020-11-02 16:24 ` Wenle Chen [this message]
2020-11-02 16:24 ` [PATCH 2/2] NFS: Limit the number of retries Wenle Chen
2020-11-02 17:45   ` Trond Myklebust
2020-11-04 11:33     ` Wenle Chen
2020-11-04 13:22       ` Olga Kornievskaia
2020-11-04 15:51         ` Wenle Chen

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=20201102162438.14034-2-chenwenle@huawei.com \
    --to=solomonchenclever@gmail.com \
    --cc=anna.schumaker@netapp.com \
    --cc=chenwenle@huawei.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=nixiaoming@huawei.com \
    --cc=solachenclever@gmail.com \
    --cc=solachenclever@hotmail.com \
    --cc=trond.myklebust@hammerspace.com \
    /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