projects
/
GitHub
/
moto-9609
/
android_kernel_motorola_exynos9610.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8a33442
)
btrfs: honor umask when creating subvol root
author
Florian Albrechtskirchinger
<falbrechtskirchinger@gmail.com>
Fri, 10 Feb 2012 21:15:54 +0000
(22:15 +0100)
committer
David Sterba
<dsterba@suse.cz>
Thu, 16 Feb 2012 15:35:41 +0000
(16:35 +0100)
Set the subvol root inode permissions based on the current umask.
fs/btrfs/inode.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/btrfs/inode.c
b/fs/btrfs/inode.c
index bf392e53261722cab671dd29e7ca09471f98bb94..6e0ee9b0d742f1f70d917fd69d1926c770274d05 100644
(file)
--- a/
fs/btrfs/inode.c
+++ b/
fs/btrfs/inode.c
@@
-6706,8
+6706,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;