Whamcloud - gitweb
LU-16056 libcfs: restore umask handling in kernel threads 33/48233/2
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 16 Aug 2022 15:52:26 +0000 (15:52 +0000)
committerAndreas Dilger <adilger@whamcloud.com>
Tue, 16 Aug 2022 17:33:28 +0000 (11:33 -0600)
commite88334d806687ad2512323f1e4c2667348f02a4e
tree2e6c42e993871157aa7c649daac1a5a1f742beda
parent2f9ffbbd62767ef9d9620ff2f1a7ab7ebe03fa27
LU-16056 libcfs: restore umask handling in kernel threads

This reverts commit 9013eb2bb5 which incorrectly assumes that Lustre
service threads do not modify umask.  A quick grep shows that umask
is modified in osd-ldiskfs __osd_create().

If some other thread sharing the same fs context is modifying umask
in an incompatible way (which includes all Lustre threads after
this patch) then it will occasionally break created file access
permissions for Lustre.

Change-Id: I589b72e4286dc84f4e3f1a0c54fe31aa988e6c18
Fixes: 9013eb2bb5 (LU-9859 libcfs: don't call unshare_fs_struct()")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
lustre/ldlm/ldlm_lib.c
lustre/ldlm/ldlm_request.c
lustre/obdclass/llog.c
lustre/ptlrpc/import.c
lustre/ptlrpc/pinger.c
lustre/ptlrpc/ptlrpcd.c
lustre/ptlrpc/service.c