From: "J. Bruce Fields" <bfields@redhat.com>
To: linux-fsdevel@vger.kernel.org
Cc: Christoph Hellwig <hch@infradead.org>,
Al Viro <viro@ZenIV.linux.org.uk>,
linux-nfs@vger.kernel.org, "J. Bruce Fields" <bfields@redhat.com>
Subject: [PATCH 5/8] exportfs: eliminate unused "noprogress" counter
Date: Fri, 25 Oct 2013 16:30:02 -0400 [thread overview]
Message-ID: <1382733005-6006-6-git-send-email-bfields@redhat.com> (raw)
In-Reply-To: <1382733005-6006-1-git-send-email-bfields@redhat.com>
From: "J. Bruce Fields" <bfields@redhat.com>
Note this counter is now being set to 0 on every pass through the loop,
so it no longer serves any useful purpose.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---
fs/exportfs/expfs.c | 15 ++-------------
1 file changed, 2 insertions(+), 13 deletions(-)
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c
index 6b5ddd5..d8ba88a 100644
--- a/fs/exportfs/expfs.c
+++ b/fs/exportfs/expfs.c
@@ -145,18 +145,9 @@ static void clear_disconnected(struct dentry *dentry)
static int
reconnect_path(struct vfsmount *mnt, struct dentry *target_dir, char *nbuf)
{
- int noprogress = 0;
int err = -ESTALE;
- /*
- * It is possible that a confused file system might not let us complete
- * the path to the root. For example, if get_parent returns a directory
- * in which we cannot find a name for the child. While this implies a
- * very sick filesystem we don't want it to cause knfsd to spin. Hence
- * the noprogress counter. If we go through the loop 10 times (2 is
- * probably enough) without getting anywhere, we just give up
- */
- while (target_dir->d_flags & DCACHE_DISCONNECTED && noprogress++ < 10) {
+ while (target_dir->d_flags & DCACHE_DISCONNECTED) {
struct dentry *pd = find_disconnected_root(target_dir);
BUG_ON(pd == mnt->mnt_sb->s_root);
@@ -230,9 +221,7 @@ reconnect_path(struct vfsmount *mnt, struct dentry *target_dir, char *nbuf)
*/
dput(npd);
dput(ppd);
- if (npd == pd)
- noprogress = 0;
- else
+ if (npd != pd)
goto out_reconnected;
if (IS_ROOT(pd)) {
/* something went wrong, we have to give up */
--
1.7.9.5
next prev parent reply other threads:[~2013-10-25 20:30 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-25 20:29 [PATCH 0/8] simplify reconnecting dentries looked up by filehandle (v2) J. Bruce Fields
2013-10-25 20:29 ` J. Bruce Fields
2013-10-25 20:29 ` [PATCH 1/8] exportfs: BUG_ON in crazy corner case J. Bruce Fields
2013-10-25 20:29 ` [PATCH 2/8] exportfs: more detailed comment for path_reconnect J. Bruce Fields
2013-10-25 20:29 ` J. Bruce Fields
2013-10-25 20:30 ` [PATCH 3/8] exportfs: clear DISCONNECTED on all parents sooner J. Bruce Fields
2013-10-25 20:30 ` J. Bruce Fields
2013-10-25 20:30 ` [PATCH 4/8] exportfs: stop retrying once we race with rename/remove J. Bruce Fields
2013-10-25 20:30 ` J. Bruce Fields
2013-10-27 7:04 ` NeilBrown
2013-10-27 7:04 ` NeilBrown
2013-10-28 8:53 ` Christoph Hellwig
2013-10-28 8:53 ` Christoph Hellwig
2013-10-28 15:08 ` J. Bruce Fields
2013-10-25 20:30 ` J. Bruce Fields [this message]
2013-10-25 20:30 ` [PATCH 6/8] exportfs: move most of reconnect_path to helper function J. Bruce Fields
2013-10-25 20:30 ` [PATCH 7/8] exportfs: better variable name J. Bruce Fields
2013-10-25 20:30 ` J. Bruce Fields
2013-10-25 20:30 ` [PATCH 8/8] exportfs: fix quadratic behavior in filehandle lookup J. Bruce Fields
2013-10-30 16:10 ` [PATCH 0/8] simplify reconnecting dentries looked up by filehandle (v2) Christoph Hellwig
2013-10-30 16:10 ` Christoph Hellwig
2013-10-30 16:38 ` J. Bruce Fields
2013-10-30 16:38 ` J. Bruce Fields
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=1382733005-6006-6-git-send-email-bfields@redhat.com \
--to=bfields@redhat.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.