Whamcloud - gitweb
LU-16056 libcfs: restore umask handling in kernel threads 14/48414/2
authorAndreas Dilger <adilger@whamcloud.com>
Thu, 1 Sep 2022 17:31:48 +0000 (10:31 -0700)
committerOleg Drokin <green@whamcloud.com>
Sat, 10 Sep 2022 00:55:17 +0000 (00:55 +0000)
commit8bf2fb4db6ac489b7c1d48c709fea76d6f534c7c
treee8ab3043b9578b52dde5cb73bb1c224ee07029a8
parentbb0908b0169a5661f42a5c5330883a3ce0a74a5e
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.

Lustre-change: https://review.whamcloud.com/48233
Lustre-commit: c92bdd97d99cc755a187987f3d5963adeb3ea475

Change-Id: I589b72e4286dc84f4e3f1a0c54fe31aa988e6c18
Fixes: 9013eb2bb5 (LU-9859 libcfs: don't call unshare_fs_struct()")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Shuichi Ihara <sihara@ddn.com>
Reviewed-by: Lai Siyao <lai.siyao@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-on: https://review.whamcloud.com/48414
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
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