As reported by Ni Wenjuan <niwj@xxxxxxxxxxxxxx> 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]. Signed-off-by: Benny Halevy <bhalevy@xxxxxxxxxxx> --- 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: -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html