From 6f46b102ac30b424c7b050341efcb64eb4d09b20 Mon Sep 17 00:00:00 2001 From: Jeff Layton Date: Tue, 21 Apr 2020 08:50:54 -0400 Subject: [PATCH] client: only override umask_cb with non-NULL values Client::init sets this, but if we later call ll_register_callbacks again with a new set of function pointers that has umask_cb set to nullptr, it'll override the value in the cmount. Only reset umask_cb if the one in args is not nullptr. Signed-off-by: Jeff Layton (cherry picked from commit 4cb17bb12feaa2b1a78a08612f8e80a191c87e5e) --- src/client/Client.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/client/Client.cc b/src/client/Client.cc index 06b14d6d095..7d833e795b6 100644 --- a/src/client/Client.cc +++ b/src/client/Client.cc @@ -10407,7 +10407,8 @@ void Client::ll_register_callbacks(struct client_callback_args *args) remount_cb = args->remount_cb; remount_finisher.start(); } - umask_cb = args->umask_cb; + if (args->umask_cb) + umask_cb = args->umask_cb; } int Client::test_dentry_handling(bool can_invalidate) -- 2.47.3