* [PATCH] btrfs: honor umask when creating subvol root
@ 2012-02-10 21:15 Florian Albrechtskirchinger
0 siblings, 0 replies; only message in thread
From: Florian Albrechtskirchinger @ 2012-02-10 21:15 UTC (permalink / raw)
To: linux-btrfs
Set the subvol root inode permissions based on the current umask.
---
fs/btrfs/inode.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 32214fe..b88e71a 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -6696,8 +6696,10 @@ int btrfs_create_subvol_root(struct btrfs_trans_handle *trans,
int err;
u64 index = 0;
- inode = btrfs_new_inode(trans, new_root, NULL, "..", 2, new_dirid,
- new_dirid, S_IFDIR | 0700, &index);
+ inode = btrfs_new_inode(trans, new_root, NULL, "..", 2,
+ new_dirid, new_dirid,
+ S_IFDIR | (~current_umask() & S_IRWXUGO),
+ &index);
if (IS_ERR(inode))
return PTR_ERR(inode);
inode->i_op = &btrfs_dir_inode_operations;
--
1.7.8.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-02-10 21:15 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-10 21:15 [PATCH] btrfs: honor umask when creating subvol root Florian Albrechtskirchinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).