Re: [PATCH] EXPORTFS: Don't return NULL from fh_to_dentry()/fh_to_parent() [ver #4]

David Howells
2008-12-05T18:49:36Z

Linus Torvalds <torvalds@linux-foundation.org> wrote:

> It's not like returning NULL doesn't make sense. Quite frankly, I think it
> makes a lot more sense than returning -ESTALE, which is a very unnatural
> error for most filesystems.

The d_obtain_alias() function will immediately return -ESTALE if given a NULL
inode, though, and sometimes it'll return some other error.

It would also seem odd to sometimes return NULL to indicate an error, and
sometimes return a -ve error code to indicate an error. Perhaps one or the
other should be selected for consistency.

David