diff mbox series

Revert "ext4: apply umask if ACL support is disabled"

Message ID 20240315142956.2420360-1-max.kellermann@ionos.com
State New
Headers show
Series Revert "ext4: apply umask if ACL support is disabled" | expand

Commit Message

Max Kellermann March 15, 2024, 2:29 p.m. UTC
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>
---
 fs/ext4/acl.h | 5 -----
 1 file changed, 5 deletions(-)

Comments

Christian Brauner March 18, 2024, 8:44 a.m. UTC | #1
On Fri, Mar 15, 2024 at 03:29:56PM +0100, Max Kellermann wrote:
> 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>
> ---

Looks good to me,
Reviewed-by: Christian Brauner <brauner@kernel.org>
Michael Forney March 25, 2024, 12:22 a.m. UTC | #2
Max Kellermann <max.kellermann@ionos.com> wrote:
> 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.

Thanks, Max! I've verified that this fixes symlink modes for me,
as well as the flatpak corruption error I was getting.

> Fixes: https://lore.kernel.org/lkml/28DSITL9912E1.2LSZUVTGTO52Q@mforney.org/
> Signed-off-by: Max Kellermann <max.kellermann@ionos.com>

Tested-by: Michael Forney <mforney@mforney.org>
diff mbox series

Patch

diff --git a/fs/ext4/acl.h b/fs/ext4/acl.h
index ef4c19e5f570..0c5a79c3b5d4 100644
--- a/fs/ext4/acl.h
+++ b/fs/ext4/acl.h
@@ -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 */