Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 17 additions & 2 deletions fs/nfsd/vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,23 @@ nfsd_cross_mnt(struct svc_rqst *rqstp, struct dentry **dpp,
* allowed without an explicit export of the new
* directory.
*/
if (err == -ENOENT && !(exp->ex_flags & NFSEXP_V4ROOT))
err = 0;
if (err == -ENOENT && !(exp->ex_flags & NFSEXP_V4ROOT)) {
#ifdef CONFIG_TRUENAS
/*
* For ZFS snapshot entries under a zfs_snapdir
* export, the fallback dentry is an automount
* stub with simple_dir_operations that returns
* empty READDIR (NFS4_OK, zero entries). The
* client caches this silently with no error
* signal to trigger re-resolution. Return ESTALE
* so the client retries via LOOKUP.
*/
if (is_snapdir)
err = -ESTALE;
else
#endif /* CONFIG_TRUENAS */
err = 0;
}
path_put(&path);
goto out;
}
Expand Down
Loading