Revert "ext4: apply umask if ACL support is disabled"
authorMax Kellermann <max.kellermann@ionos.com>
Fri, 15 Mar 2024 14:29:56 +0000 (15:29 +0100)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 2 May 2024 22:25:39 +0000 (18:25 -0400)
This reverts commit 484fd6c1de13b336806a967908a927cc0356e312.  The
commit caused a regression because now the umask was applied to
symlinks and the fix is unnecessary because the umask/O_TMPFILE bug
has been fixed somewhere else already.

Fixes: https://lore.kernel.org/lkml/28DSITL9912E1.2LSZUVTGTO52Q@mforney.org/
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Tested-by: Michael Forney <mforney@mforney.org>
Link: https://lore.kernel.org/r/20240315142956.2420360-1-max.kellermann@ionos.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
fs/ext4/acl.h

index ef4c19e5f57060b13ab4a2b45b8ffb967eff4fbf..0c5a79c3b5d4806f9a76241c7fd1ee5a971b9dba 100644 (file)
@@ -68,11 +68,6 @@ extern int ext4_init_acl(handle_t *, struct inode *, struct inode *);
 static inline int
 ext4_init_acl(handle_t *handle, struct inode *inode, struct inode *dir)
 {
-       /* usually, the umask is applied by posix_acl_create(), but if
-          ext4 ACL support is disabled at compile time, we need to do
-          it here, because posix_acl_create() will never be called */
-       inode->i_mode &= ~current_umask();
-
        return 0;
 }
 #endif  /* CONFIG_EXT4_FS_POSIX_ACL */