public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Trond Myklebust <trond.myklebust@fys.uio.no>
To: David Chow <davidchow@rcn.com.hk>
Cc: Andreas Schwab <schwab@suse.de>,
	linux-kernel@vger.kernel.org, nfs@lists.sourceforge.net
Subject: Re: [PATCH] NFSv3 symlink bug
Date: 13 Oct 2001 21:12:15 +0200	[thread overview]
Message-ID: <shsvghjuzg0.fsf@charged.uio.no> (raw)
In-Reply-To: <jelmiuj7w2.fsf@sykes.suse.de> <3BC88B44.E461CB63@rcn.com.hk>
In-Reply-To: David Chow's message of "Sun, 14 Oct 2001 02:43:16 +0800"

>>>>> " " == David Chow <davidchow@rcn.com.hk> writes:

     > Not just that. the call to vfs_symlink on an NFS v3 mounted
     > filesystem, the dentry that passed to vfs_symlink did not
     > result with an inode member it remains null. This also lead to
     > problem in the dcache and didn't have a d_instantiate() and
     > d_add() in the nfs_symlink() . I have proved this is a bug. in

Wrong. Look again... We do instantiate NFSv3 symlinks.

     > kernel version 2.4.0 up to 2.4.10 . Not tested with 2.4.12 and
     > 2.4.11 . This will not affect most of the process context

The only bug I can see is if nfs_fhget() fails to allocate a new
inode. In that case we should drop the dentry. That should be a pretty
rare bug though and would only happen under extremely low memory
conditions.

Cheers,
   Trond

--- linux-2.4.12/fs/nfs/dir.c.orig	Tue Jun 12 20:15:08 2001
+++ linux-2.4.12/fs/nfs/dir.c	Sat Oct 13 21:07:26 2001
@@ -928,6 +928,8 @@
 					  &attr, &sym_fh, &sym_attr);
 	if (!error && sym_fh.size != 0 && (sym_attr.valid & NFS_ATTR_FATTR)) {
 		error = nfs_instantiate(dentry, &sym_fh, &sym_attr);
+		if (error)
+			d_drop(dentry);
 	} else {
 		if (error == -EEXIST)
 			printk("nfs_proc_symlink: %s/%s already exists??\n",


      reply	other threads:[~2001-10-13 19:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-10-02 16:58 [PATCH] NFSv3 symlink bug Andreas Schwab
2001-10-13 18:43 ` David Chow
2001-10-13 19:12   ` Trond Myklebust [this message]

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=shsvghjuzg0.fsf@charged.uio.no \
    --to=trond.myklebust@fys.uio.no \
    --cc=davidchow@rcn.com.hk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nfs@lists.sourceforge.net \
    --cc=schwab@suse.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