aboutsummaryrefslogtreecommitdiffstats
path: root/fs/overlayfs/super.c
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@redhat.com>2016-07-01 16:34:26 -0400
committerMiklos Szeredi <mszeredi@redhat.com>2016-07-29 12:05:23 +0200
commit39a25b2b37629f65e5a1eba1b353d0b47687c2ca (patch)
tree9e167746ccbd3779aefa536d4e94d9b15009be8c /fs/overlayfs/super.c
parentovl: move some common code in a function (diff)
downloadlinux-dev-39a25b2b37629f65e5a1eba1b353d0b47687c2ca.tar.xz
linux-dev-39a25b2b37629f65e5a1eba1b353d0b47687c2ca.zip
ovl: define ->get_acl() for overlay inodes
Now we are planning to do DAC permission checks on overlay inode itself. And to make it work, we will need to make sure we can get acls from underlying inode. So define ->get_acl() for overlay inodes and this in turn calls into underlying filesystem to get acls, if any. Signed-off-by: Vivek Goyal <vgoyal@redhat.com> Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Diffstat (limited to '')
-rw-r--r--fs/overlayfs/super.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/fs/overlayfs/super.c b/fs/overlayfs/super.c
index 5341ca57677c..893d6e0ea1c5 100644
--- a/fs/overlayfs/super.c
+++ b/fs/overlayfs/super.c
@@ -159,6 +159,13 @@ struct dentry *ovl_entry_real(struct ovl_entry *oe, bool *is_upper)
return realdentry;
}
+struct inode *ovl_inode_real(struct inode *inode)
+{
+ bool tmp;
+
+ return d_inode(ovl_entry_real(inode->i_private, &tmp));
+}
+
struct vfsmount *ovl_entry_mnt_real(struct ovl_entry *oe, struct inode *inode,
bool is_upper)
{
@@ -1172,6 +1179,7 @@ static int ovl_fill_super(struct super_block *sb, void *data, int silent)
sb->s_op = &ovl_super_operations;
sb->s_root = root_dentry;
sb->s_fs_info = ufs;
+ sb->s_flags |= MS_POSIXACL;
return 0;