Whamcloud - gitweb
LU-16056 libcfs: restore umask handling in kernel threads 33/48233/3
authorAndreas Dilger <adilger@whamcloud.com>
Tue, 16 Aug 2022 15:52:26 +0000 (15:52 +0000)
committerOleg Drokin <green@whamcloud.com>
Thu, 1 Sep 2022 05:52:25 +0000 (05:52 +0000)
commitc92bdd97d99cc755a187987f3d5963adeb3ea475
tree328df2deb661f51977f05473e515b4279aa79c25
parent76c3fa96dc30f21e95d80f9119972d7358975258
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>
Reviewed-on: https://review.whamcloud.com/48233
Tested-by: jenkins <devops@whamcloud.com>
Reviewed-by: Shuichi Ihara <sihara@ddn.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Oleg Drokin <green@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