orangefs: fix mode handling
authorChristian Brauner <brauner@kernel.org>
Sat, 12 Nov 2022 21:36:42 +0000 (22:36 +0100)
committerChristian Brauner (Microsoft) <brauner@kernel.org>
Sun, 13 Nov 2022 09:27:52 +0000 (10:27 +0100)
commite40df4281b86d5f7c1615dd9eda597675340a8d3
tree0bdc81c2b072f095ed0d9cf00e3fc5155a7658a7
parent5b52aebef8954cadff29918bb61d7fdc7be07837
orangefs: fix mode handling

In 4053d2500beb ("orangefs: rework posix acl handling when creating new
filesystem objects") we tried to precalculate the correct mode when
creating a new inode. However, this leads to regressions when creating new
filesystem objects.

Even if we precalculate the mode we still need to call __orangefs_setattr()
to perform additional checks and we also need to update the mode of
ACL_TYPE_ACCESS acls set on the inode. The patch referenced above regressed
that. Restore that part of the old behavior and remove the mode
precalculation as it doesn't get us anything anymore.

Fixes: 4053d2500beb ("orangefs: rework posix acl handling when creating new filesystem objects")
Reported-by: Mike Marshall <hubcap@omnibond.com>
Signed-off-by: Christian Brauner (Microsoft) <brauner@kernel.org>
fs/orangefs/inode.c
fs/orangefs/orangefs-kernel.h
fs/orangefs/orangefs-utils.c