]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
client: only override umask_cb with non-NULL values
authorJeff Layton <jlayton@redhat.com>
Tue, 21 Apr 2020 12:50:54 +0000 (08:50 -0400)
committerNathan Cutler <ncutler@suse.com>
Thu, 4 Jun 2020 13:00:12 +0000 (15:00 +0200)
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 <jlayton@redhat.com>
(cherry picked from commit 4cb17bb12feaa2b1a78a08612f8e80a191c87e5e)

src/client/Client.cc

index 06b14d6d095da30e17347006ebdba56ba4fc1964..7d833e795b6e9d262f22640c5aed3bb8beb70a0d 100644 (file)
@@ -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)