]> git-server-git.apps.pok.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)
committerVicente Cheng <freeze.bilsted@gmail.com>
Wed, 20 May 2020 08:46:45 +0000 (08:46 +0000)
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 b4e4a1abbaa22a1a6d3322c5c8c692dba897d00c..04e79d719aac3271e6ffc66a1fe2d8c28620327a 100644 (file)
@@ -10448,7 +10448,8 @@ void Client::ll_register_callbacks(struct ceph_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)