"J. Bruce Fields": > On Thu, Apr 23, 2009 at 04:27:05PM -0400, bfields wrote: > > On Thu, Apr 23, 2009 at 03:40:23PM +0900, hooanon05@xxxxxxxxxxx wrote: > > > > > > "J. Bruce Fields": > > > > > Isn't it better to test it BEFORE fh_compose()? > > > ::: > > > > Yes, I think you're right. ::: > Err, no, I was confused, the v3 spec does clearly state that the > filehandle field here is just an optional optimization. > > But now that I look fh_compose() seems perfectly capable of dealing with > negative dentries, so I don't think your patch is necessary after all. I agree with you. I just thought it is _better_ to test it BEFORE fh_compose(). I don't think fh_compose() would crash. If you move lookup_one_len() from nfsd4_encode_dirent_fattr() to nfsd4_encode_dirent(), then I'd suggest you to move dput() too. Applying your patch, - when we get a negative dentry, nfsd4_encode_dirent() will return without dput(). Is it OK? - when lookup_one_len() returns an error, nfsd4_encode_dirent() may crash later. J. R. Okajima -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html