]> git.baikalelectronics.ru Git - kernel.git/commit
overlayfs: Fix setting IOP_XATTR flag
authorVivek Goyal <vgoyal@redhat.com>
Fri, 14 Oct 2016 01:03:36 +0000 (03:03 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 15 Oct 2016 00:00:34 +0000 (20:00 -0400)
commit6f6800b651ab1c46b5e0c623d67e47d2d8d9aaff
tree16f29b5ab2c57f5b712e8d71cfae5b83a58fb672
parent71c154a69d3a399866e78352aa1781afcd5debec
overlayfs: Fix setting IOP_XATTR flag

ovl_fill_super calls ovl_new_inode to create a root inode for the new
superblock before initializing sb->s_xattr.  This wrongly causes
IOP_XATTR to be cleared in i_opflags of the new inode, causing SELinux
to log the following message:

  SELinux: (dev overlay, type overlay) has no xattr support

Fix this by initializing sb->s_xattr and similar fields before calling
ovl_new_inode.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/overlayfs/super.c