Skip to content

Commit

Permalink
nfsd: allow exports of symlinks
Browse files Browse the repository at this point in the history
We want to allow exports of symlinks, to allow mountd to communicate to
the kernel which symlinks lead to exports, and hence which symlinks need
to be visible on the pseudofilesystem.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
  • Loading branch information
J. Bruce Fields committed Dec 15, 2009
1 parent 3227fa4 commit f2ca715
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions fs/nfsd/export.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,10 +358,12 @@ static struct svc_export *svc_export_lookup(struct svc_export *);
static int check_export(struct inode *inode, int flags, unsigned char *uuid)
{

/* We currently export only dirs and regular files.
* This is what umountd does.
/*
* We currently export only dirs, regular files, and (for v4
* pseudoroot) symlinks.
*/
if (!S_ISDIR(inode->i_mode) &&
!S_ISLNK(inode->i_mode) &&
!S_ISREG(inode->i_mode))
return -ENOTDIR;

Expand Down

0 comments on commit f2ca715

Please sign in to comment.