All of lore.kernel.org
 help / color / mirror / Atom feed
From: Benny Halevy <bhalevy@panasas.com>
To: Yang Hongyang <yanghy@cn.fujitsu.com>,
	"J. Bruce Fields" <bfields@fieldses.org>
Cc: Trond Myklebust <trond.myklebust@fys.uio.no>,
	Ni Wenjuan <niwj@cn.fujitsu.com>,
	linux-nfs@vger.kernel.org
Subject: Re: [PATCH] NFSD: do not return nfserr_symlink for the LINK operation
Date: Thu, 19 Mar 2009 09:04:05 +0200	[thread overview]
Message-ID: <49C1EE65.7010008@panasas.com> (raw)
In-Reply-To: <49C1ED5B.6040000@cn.fujitsu.com>

On Mar. 19, 2009, 8:59 +0200, Yang Hongyang <yanghy@cn.fujitsu.com> wrote:
> Benny Halevy wrote:
>> As reported by Ni Wenjuan <niwj@cn.fujitsu.com> on 2009-03-05:
>>> the result of newpynfs test case of  LINK4a .  if you link with target directoty
>>> is a symbole file,it should get NFS4ERR_NOTDIR ,instead got NFS4ERR_SYMLINK.
>> THE LINK operation doesn't list NFS4ERR_SYMLINK as a valid error in the spec.
>> Although NFS4ERR_SYMLINK seems like a reasonable error and even though
>> it was added for LINK in NFSv4.1 we should still return NFSERR_NOTDIR for
>> nfsv[234].
> 
> HI,Benny:
> There are other places that have the same problem,i'm preparing a all-in-one
> patch.^!^

Cool.
Bruce, please ignore this patch then.

Thanks!

Benny

> 
>> Signed-off-by: Benny Halevy <bhalevy@panasas.com>
>> ---
>>  fs/nfsd/vfs.c |    3 +++
>>  1 files changed, 3 insertions(+), 0 deletions(-)
>>
>> diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c
>> index 6e50aaa..9165b1f 100644
>> --- a/fs/nfsd/vfs.c
>> +++ b/fs/nfsd/vfs.c
>> @@ -1637,6 +1637,9 @@ out_dput:
>>  out_unlock:
>>  	fh_unlock(ffhp);
>>  out:
>> +	/* nfserr_symlink returned from fh_verify is inappropriate for LINK */
>> +	if (err == nfserr_symlink)
>> +		err = nfserr_notdir;
>>  	return err;
>>  
>>  out_nfserr:
>>
>>
> 
> 

  reply	other threads:[~2009-03-19  7:04 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-05  9:32 NFS4ERR_SYMLINK error Ni Wenjuan
2009-03-05 10:09 ` Benny Halevy
2009-03-06 21:32   ` J. Bruce Fields
2009-03-07 18:59     ` Benny Halevy
2009-03-09 18:06       ` J. Bruce Fields
2009-03-09 18:18         ` Trond Myklebust
2009-03-13  8:13         ` Yang Hongyang
2009-03-18 23:06           ` J. Bruce Fields
2009-03-19  6:51             ` [PATCH] NFSD: do not return nfserr_symlink for the LINK operation Benny Halevy
2009-03-19  6:59               ` Yang Hongyang
2009-03-19  7:04                 ` Benny Halevy [this message]
2009-03-19  8:18                   ` Yang Hongyang
2009-03-19  9:25                     ` Benny Halevy
2009-03-19  9:30                       ` Yang Hongyang
2009-03-19  9:53                         ` Benny Halevy
2009-03-19  9:34                       ` Yang Hongyang
2009-03-19 10:00                         ` Benny Halevy
2009-03-19  9:46                       ` Yang Hongyang
2009-03-19 20:00                         ` J. Bruce Fields
2009-03-19 20:15                           ` J. Bruce Fields
2009-03-20  6:16                             ` Yang Hongyang
2009-03-20  5:59                           ` Yang Hongyang
2009-03-20  7:05                           ` Yang Hongyang
2009-04-03  5:18                             ` Yang Hongyang

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=49C1EE65.7010008@panasas.com \
    --to=bhalevy@panasas.com \
    --cc=bfields@fieldses.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=niwj@cn.fujitsu.com \
    --cc=trond.myklebust@fys.uio.no \
    --cc=yanghy@cn.fujitsu.com \
    /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.