On Mon, Dec 02, 2024 at 03:30:46PM -0500, Scott Mayhew wrote: > 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). I agree, this looks like an unintended regression in 15dc0bea. Reviewed-by: Chuck Lever <chuck.lever@xxxxxxxxxx> I suggest adding: Link: https://bugs.debian.org/1035908 Link: https://bugs.debian.org/1083098 > 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 > > -- Chuck Lever