From: Jeff Layton Date: Tue, 21 Apr 2020 12:50:54 +0000 (-0400) Subject: client: only override umask_cb with non-NULL values X-Git-Tag: v14.2.10~7^2~8 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=6f46b102ac30b424c7b050341efcb64eb4d09b20;p=ceph.git 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) --- diff --git a/src/client/Client.cc b/src/client/Client.cc index 06b14d6d095d..7d833e795b6e 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)