[PATCH nfs-utils 12/17] support/export: check for pending requests after opening netlink sockets

Jeff Layton
2026-03-16T15:17:06Z

It's possible for there to be requests queued before mountd comes
online. Always check for already-pending requests after opening netlink
sockets.

Signed-off-by: Jeff Layton <jlayton@kernel.org>
---
support/export/cache.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/support/export/cache.c b/support/export/cache.c
index 19cfbf6594b0a51d85814460f3153add89aa3a8a..4261e1861215ea53183dd8ce14890b0195d841e8 100644
--- a/support/export/cache.c
+++ b/support/export/cache.c
@@ -3014,8 +3014,19 @@ void cache_open(void)
int i;

if (cache_nfsd_nl_open() == 0) {
- if (cache_sunrpc_nl_open() == 0)
+ if (cache_sunrpc_nl_open() == 0) {
+ /*
+ * Check for pending requests, in case any
+ * were queued before we opened the socket.
+ */
+ auth_reload();
+ cache_nl_process_export();
+ cache_nl_process_expkey();
+ cache_nl_process_ip_map();
+ if (manage_gids)
+ cache_nl_process_unix_gid();
return;
+ }
xlog(L_NOTICE, "sunrpc netlink family unavailable, falling back to /proc");
nl_socket_free(nfsd_nl_notify_sock);
nfsd_nl_notify_sock = NULL;

--
2.53.0