[nfs-utils PATCH] exports: Fix referrals when --enable-junction=no

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Commit 15dc0bea ("exportd: Moved cache upcalls routines into
libexport.a") caused write_fsloc() to be elided when junction support is
disabled.  Get rid of the bogus #ifdef HAVE_JUNCTION_SUPPORT blocks so
that referrals work again (the only #ifdef HAVE_JUNCTION_SUPPORT should
be around actual junction code).

Fixes: 15dc0bea ("exportd: Moved cache upcalls routines into libexport.a")
Signed-off-by: Scott Mayhew <smayhew@xxxxxxxxxx>
---
 support/export/cache.c | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/support/export/cache.c b/support/export/cache.c
index 6c0a44a3..3a8e57cf 100644
--- a/support/export/cache.c
+++ b/support/export/cache.c
@@ -34,10 +34,7 @@
 #include "pseudoflavors.h"
 #include "xcommon.h"
 #include "reexport.h"
-
-#ifdef HAVE_JUNCTION_SUPPORT
 #include "fsloc.h"
-#endif
 
 #ifdef USE_BLKID
 #include "blkid/blkid.h"
@@ -999,7 +996,6 @@ static void nfsd_retry_fh(struct delayed *d)
 	*dp = d;
 }
 
-#ifdef HAVE_JUNCTION_SUPPORT
 static void write_fsloc(char **bp, int *blen, struct exportent *ep)
 {
 	struct servers *servers;
@@ -1022,7 +1018,6 @@ static void write_fsloc(char **bp, int *blen, struct exportent *ep)
 	qword_addint(bp, blen, servers->h_referral);
 	release_replicas(servers);
 }
-#endif
 
 static void write_secinfo(char **bp, int *blen, struct exportent *ep, int flag_mask, int extra_flag)
 {
@@ -1120,9 +1115,7 @@ static int dump_to_cache(int f, char *buf, int blen, char *domain,
 		qword_addint(&bp, &blen, exp->e_anongid);
 		qword_addint(&bp, &blen, fsidnum);
 
-#ifdef HAVE_JUNCTION_SUPPORT
 		write_fsloc(&bp, &blen, exp);
-#endif
 		write_secinfo(&bp, &blen, exp, flag_mask, do_fsidnum ? NFSEXP_FSID : 0);
 		if (exp->e_uuid == NULL || different_fs) {
 			char u[16];
-- 
2.46.2





[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux