mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: "Peter Wächtler" <pwaechtler@loewe-komp.de>
Cc: lkml <linux-kernel@vger.kernel.org>
Subject: Re: nfsfh.c:nfsd_findparent lookup("..") failure fix in 2.4.4 - xfs related?
Date: 18 Oct 2001 12:42:01 +0200	[thread overview]
Message-ID: <shsitddmdqe.fsf@charged.uio.no> (raw)
In-Reply-To: <3BCEA924.14415870@loewe-komp.de>
In-Reply-To: Peter =?iso-8859-1?q?W=E4chtler's?= message of "Thu, 18 Oct 2001 12:04:20 +0200"

>>>>> " " == Peter Wächtler <pwaechtler@loewe-komp.de> writes:

     > The following diff was made in 2.4.4.  diff -u --recursive
     > --new-file v2.4.4/linux/fs/nfsd/nfsfh.c linux/fs/nfsd/nfsfh.c
     > --- v2.4.4/linux/fs/nfsd/nfsfh.c Fri Feb 9 11:29:44 2001
     > +++ linux/fs/nfsd/nfsfh.c Sat May 19 17:47:55 2001
     > @@ -244,6 +245,11 @@
     >          */
     >         pdentry = child->d_inode->i_op->lookup(child->d_inode,
     >         tdentry); d_drop(tdentry); /* we never want ".." hashed
     >         */
     > + if (!pdentry && tdentry->d_inode == NULL) {
     > + /* File system cannot find ".." ... sad but possible */
     > + dput(tdentry);
     > + pdentry = ERR_PTR(-EINVAL);
     > + }


     > Umh. How is it possible to have a valid dentry which has no
     > parent?  Even "/.." is linked to "/."

Who said these are *valid* dentries?

There's no way you can fit full path information into an NFS
filehandle, so when the client passes such an object to nfsd, the
latter sometimes has to make so-called 'disconnected' dentries. These
are dentries which contain no path information, and are basically just
providing a dentry alias for the inode.

The code you are looking at attempts to call the filesystem in order
to lookup a file named '..' from just such a disconnected dentry. The
purpose being to actually recreate the path, and hence convert the
dentry into a valid one...

Cheers,
  Trond

  reply	other threads:[~2001-10-18 10:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-18 10:04 Peter Wächtler
2001-10-18 10:42 ` Trond Myklebust [this message]
2001-10-18 10:53 ` Neil Brown

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=shsitddmdqe.fsf@charged.uio.no \
    --to=trond.myklebust@fys.uio.no \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pwaechtler@loewe-komp.de \
    /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

all inboxes | Powered by JetHome®