aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfsd/export.c
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@citi.umich.edu>2009-11-12 17:26:19 -0500
committerJ. Bruce Fields <bfields@citi.umich.edu>2009-12-15 14:07:24 -0500
commitf2ca7153ca49a407ea1c7232c9fa7e9849f03f9c (patch)
tree56e85e17fa0c579bf4d6aa12eec13da5833b2bb7 /fs/nfsd/export.c
parent3227fa41abc191384fa81b3bcf52aa7fccb31536 (diff)
nfsd: allow exports of symlinks
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>
Diffstat (limited to 'fs/nfsd/export.c')
-rw-r--r--fs/nfsd/export.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/nfsd/export.c b/fs/nfsd/export.c
index c64d55f319bd..18ac20ffedd2 100644
--- a/fs/nfsd/export.c
+++ b/fs/nfsd/export.c
@@ -358,10 +358,12 @@ static struct svc_export *svc_export_lookup(struct svc_export *);
358static int check_export(struct inode *inode, int flags, unsigned char *uuid) 358static int check_export(struct inode *inode, int flags, unsigned char *uuid)
359{ 359{
360 360
361 /* We currently export only dirs and regular files. 361 /*
362 * This is what umountd does. 362 * We currently export only dirs, regular files, and (for v4
363 * pseudoroot) symlinks.
363 */ 364 */
364 if (!S_ISDIR(inode->i_mode) && 365 if (!S_ISDIR(inode->i_mode) &&
366 !S_ISLNK(inode->i_mode) &&
365 !S_ISREG(inode->i_mode)) 367 !S_ISREG(inode->i_mode))
366 return -ENOTDIR; 368 return -ENOTDIR;
367 369