orangefs: rework posix acl handling when creating new filesystem objects
authorChristian Brauner <brauner@kernel.org>
Fri, 23 Sep 2022 08:19:34 +0000 (10:19 +0200)
committerChristian Brauner (Microsoft) <brauner@kernel.org>
Wed, 19 Oct 2022 08:30:52 +0000 (10:30 +0200)
commit4053d2500beb0ca1e0757665af9e31da249a7a52
treea8eea5747d2f28371f77017486780048a302b6be
parent9abf2313adc1ca1b6180c508c25f22f9395cc780
orangefs: rework posix acl handling when creating new filesystem objects

When creating new filesytem objects orangefs used to create posix acls
after it had created and inserted a new inode. This made it necessary to
all posix_acl_chmod() on the newly created inode in case the mode of the
inode would be changed by the posix acls.

Instead of doing it this way calculate the correct mode directly before
actually creating the inode. So we first create posix acls, then pass
the mode that posix acls mandate into the orangefs getattr helper and
calculate the correct mode. This is needed so we can simply change
posix_acl_chmod() to take a dentry instead of an inode argument in the
next patch.

Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
fs/orangefs/acl.c
fs/orangefs/inode.c
fs/orangefs/orangefs-kernel.h
fs/orangefs/orangefs-utils.c