From: Jan Blunck <jblunck@suse.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Miklos Szeredi <miklos@szeredi.hu>, linux-fsdevel@vger.kernel.org
Subject: [PATCH] VFS: Remove lives_below_in_same_fs()
Date: Fri, 14 Mar 2008 16:22:38 +0100 [thread overview]
Message-ID: <20080314152238.GC27730@T61> (raw)
Remove lives_below_in_same_fs() since is_subdir() from fs/dcache.c is
providing the same functionality.
Signed-off-by: Jan Blunck <jblunck@suse.de>
---
fs/namespace.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
Index: b/fs/namespace.c
===================================================================
--- a/fs/namespace.c
+++ b/fs/namespace.c
@@ -729,17 +729,6 @@ static int mount_is_safe(struct nameidat
#endif
}
-static int lives_below_in_same_fs(struct dentry *d, struct dentry *dentry)
-{
- while (1) {
- if (d == dentry)
- return 1;
- if (d == NULL || d == d->d_parent)
- return 0;
- d = d->d_parent;
- }
-}
-
struct vfsmount *copy_tree(struct vfsmount *mnt, struct dentry *dentry,
int flag)
{
@@ -756,7 +745,7 @@ struct vfsmount *copy_tree(struct vfsmou
p = mnt;
list_for_each_entry(r, &mnt->mnt_mounts, mnt_child) {
- if (!lives_below_in_same_fs(r->mnt_mountpoint, dentry))
+ if (!is_subdir(r->mnt_mountpoint, dentry))
continue;
for (s = r; s; s = next_mnt(s, r)) {
next reply other threads:[~2008-03-14 15:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-14 15:22 Jan Blunck [this message]
2008-03-14 15:51 ` [PATCH] VFS: Remove lives_below_in_same_fs() Miklos Szeredi
-- strict thread matches above, loose matches on Subject: below --
2007-10-12 15:58 Jan Blunck
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=20080314152238.GC27730@T61 \
--to=jblunck@suse.de \
--cc=akpm@linux-foundation.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=miklos@szeredi.hu \
/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.