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: TBD (from
e88334d806687ad2512323f1e4c2667348f02a4e)
Fixes:
9013eb2bb5 (LU-9859 libcfs: don't call unshare_fs_struct()")
Signed-off-by: Andreas Dilger <adilger@whamcloud.com>
Change-Id: I589b72e4286dc84f4e3f1a0c54fe31aa988e6c18
Reviewed-on: https://review.whamcloud.com/48236
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>