--- old/fs/nfsd/nfsfh.c Thu Aug 1 16:16:19 2002
+++ new/fs/nfsd/nfsfh.c Sun Aug 11 22:52:47 2002
@@ -234,11 +234,23 @@ fh_verify(struct svc_rqst *rqstp, struct
/* Type can be negative when creating hardlinks - not to a dir */
if (type > 0 && (inode->i_mode & S_IFMT) != type) {
- error = (type == S_IFDIR)? nfserr_notdir : nfserr_isdir;
+ if (rqstp->rq_vers == 4 && (inode->i_mode & S_IFMT) == S_IFLNK)
+ error = nfserr_symlink;
+ else if (type == S_IFDIR)
+ error = nfserr_notdir;
+ else if ((inode->i_mode & S_IFMT) == S_IFDIR)
+ error = nfserr_isdir;
+ else
+ error = nfserr_inval;
goto out;
}
if (type < 0 && (inode->i_mode & S_IFMT) == -type) {
- error = (type == -S_IFDIR)? nfserr_notdir : nfserr_isdir;
+ if (rqstp->rq_vers == 4 && (inode->i_mode & S_IFMT) == S_IFLNK)
+ error = nfserr_symlink;
+ else if (type == -S_IFDIR)
+ error = nfserr_isdir;
+ else
+ error = nfserr_notdir;
goto out;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/