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 4/5] exportfs: slight reorganization of reconnect loop
Date: Tue, 15 Oct 2013 16:39:32 -0400 [thread overview]
Message-ID: <1381869574-10662-5-git-send-email-bfields@redhat.com> (raw)
In-Reply-To: <1381869574-10662-1-git-send-email-bfields@redhat.com>
From: "J. Bruce Fields" <bfields@redhat.com>
Just cleanup, no change in functionality
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
---
fs/exportfs/expfs.c | 22 +++++++++++++---------
1 file changed, 13 insertions(+), 9 deletions(-)
diff --git a/fs/exportfs/expfs.c b/fs/exportfs/expfs.c
index 24fb763..afa7c9c 100644
--- a/fs/exportfs/expfs.c
+++ b/fs/exportfs/expfs.c
@@ -208,19 +208,23 @@ reconnect_path(struct vfsmount *mnt, struct dentry *target_dir, char *nbuf)
/* must have found a connected parent - great */
clear_disconnected(target_dir);
noprogress = 0;
- } else if (dentry == mnt->mnt_sb->s_root) {
+ dput(dentry);
+ continue;
+ }
+ if (dentry == mnt->mnt_sb->s_root) {
printk(KERN_ERR "export: Eeek filesystem root is not connected, impossible\n");
clear_disconnected(target_dir);
noprogress = 0;
- } else {
- /*
- * We have hit the top of a disconnected path, try to
- * find parent and connect.
- */
- err = reconnect_one(mnt, dentry, nbuf, &noprogress);
- if (err)
- return err;
+ dput(dentry);
+ continue;
}
+ /*
+ * We have hit the top of a disconnected path, try to
+ * find parent and connect.
+ */
+ err = reconnect_one(mnt, dentry, nbuf, &noprogress);
+ if (err)
+ return err;
dput(dentry);
}
--
1.7.9.5
next prev parent reply other threads:[~2013-10-15 20:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-15 20:39 simplify reconnecting dentries looked up by filehandle J. Bruce Fields
2013-10-15 20:39 ` [PATCH 1/5] exportfs: clear DISCONNECTED on all parents sooner J. Bruce Fields
[not found] ` <1381869574-10662-2-git-send-email-bfields-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-10-16 7:13 ` Christoph Hellwig
[not found] ` <20131016071343.GB27799-wEGCiKHe2LqWVfeAwA7xHQ@public.gmane.org>
2013-10-16 13:56 ` J. Bruce Fields
2013-10-15 20:39 ` [PATCH 2/5] exportfs: move most of reconnect_path to helper function J. Bruce Fields
[not found] ` <1381869574-10662-3-git-send-email-bfields-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-10-16 7:16 ` Christoph Hellwig
2013-10-15 20:39 ` J. Bruce Fields [this message]
2013-10-16 7:19 ` [PATCH 4/5] exportfs: slight reorganization of reconnect loop Christoph Hellwig
[not found] ` <1381869574-10662-1-git-send-email-bfields-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-10-15 20:39 ` [PATCH 3/5] exportfs: make variable names more helpful J. Bruce Fields
[not found] ` <1381869574-10662-4-git-send-email-bfields-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-10-16 7:18 ` Christoph Hellwig
2013-10-15 20:39 ` [PATCH 5/5] exportfs: fix quadratic behavior in filehandle lookup J. Bruce Fields
[not found] ` <1381869574-10662-6-git-send-email-bfields-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-10-16 8:04 ` Christoph Hellwig
2013-10-16 18:29 ` J. Bruce Fields
2013-10-16 19:22 ` J. Bruce Fields
2013-10-16 22:00 ` J. Bruce Fields
2013-10-16 18:24 ` simplify reconnecting dentries looked up by filehandle Christoph Hellwig
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=1381869574-10662-5-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 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).