Skip to contentSkip to conversation

Btrfs: Fix setting umask when POSIX ACLs are not enabled

PATCH In review Chris Ball 2 participants 2 messages Sep 17, 2009 Btrfs file system

lore
Share & tools
lore

Chris Ball

author
#0 lore raw

PATCH 2/2 Btrfs: Fix setting umask when POSIX ACLs are not enabled

We currently set sb->s_flags |= MS_POSIXACL unconditionally, which is incorrect -- it tells the VFS that it shouldn't set umask because we will, yet we don't set it ourselves if we aren't using POSIX ACLs, so the umask ends up ignored.

---
 fs/btrfs/super.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
fs/btrfs/super.c +2 -0
index 6d6d06c..48ed1c0 100644
@@ -344,7 +344,9 @@ static int btrfs_fill_super(struct super_block *sb,
 	sb->s_export_op = &btrfs_export_ops;
 	sb->s_xattr = btrfs_xattr_handlers;
 	sb->s_time_gran = 1;
+#ifdef CONFIG_BTRFS_POSIX_ACL
 	sb->s_flags |= MS_POSIXACL;
+#endif
 
 	tree_root = open_ctree(sb, fs_devices, (char *)data);
 
Signature · 6 lines
1.6.4


-- 
Chris Ball   <[email protected]>
One Laptop Per Child
#1 lore raw

Hi Chris!

Quoted 9 lines · Chris Ball

We currently set sb->s_flags |= MS_POSIXACL unconditionally, which is incorrect -- it tells the VFS that it shouldn't set umask because we will, yet we don't set it ourselves if we aren't using POSIX ACLs, so the umask ends up ignored.

---
 fs/btrfs/super.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

Works fine now! Thank you .. :)

With best regards from the Soul, Alex.