]> bbs.cooldavid.org Git - net-next-2.6.git/commitdiff
nfsd: allow exports of symlinks
authorJ. Bruce Fields <bfields@citi.umich.edu>
Thu, 12 Nov 2009 22:26:19 +0000 (17:26 -0500)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Tue, 15 Dec 2009 19:07:24 +0000 (14:07 -0500)
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>
fs/nfsd/export.c

index c64d55f319bd94575613160f96ef4d7372b17b75..18ac20ffedd2ead4a13dac744d1c605f6f4c8bb7 100644 (file)
@@ -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;