Skip to content

Commit

Permalink
NFSD: Teach nfsd_mountpoint() auto mounts
Browse files Browse the repository at this point in the history
Currently nfsd_mountpoint() tests for mount points using d_mountpoint(),
this works only when a mount point is already uncovered.
In our case the mount point is of type auto mount and can be coverted.
i.e. ->d_automount() was not called.

Using d_managed() nfsd_mountpoint() can test whether a mount point is
either already uncovered or can be uncovered later.

Signed-off-by: Richard Weinberger <[email protected]>
Reviewed-by: Ian Kent <[email protected]>
Reviewed-by: Jeff Layton <[email protected]>
Signed-off-by: Chuck Lever <[email protected]>
  • Loading branch information
richardweinberger authored and chucklever committed Feb 20, 2023
1 parent c9c3395 commit 50f5fda
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/nfsd/vfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ int nfsd_mountpoint(struct dentry *dentry, struct svc_export *exp)
return 1;
if (nfsd4_is_junction(dentry))
return 1;
if (d_mountpoint(dentry))
if (d_managed(dentry))
/*
* Might only be a mountpoint in a different namespace,
* but we need to check.
Expand Down

0 comments on commit 50f5fda

Please sign in to comment.