fuse: Add posix acl support

Change fuse over to using generic_getxattr() and
generic_setxattr() for handling xattrs so that it can use the
standard posix acl xattr handlers, falling back to the generic
handlers for everything else. Add get_acl() and set_acl()
callbacks which pass the xattrs through to the generic fuse
xattr handlers and update the cached acl values as needed.

Forget cached acls when inode attributes expired or refreshed,
and keep inode->i_mode and acls in sync.

When CONFIG_POSIX_ACL=n fuse will now return -EOPNOTSUPP for
posix acls, as the ids in the xattrs have not been mapped into
s_user_ns.

Signed-off-by: Seth Forshee <seth.forshee@canonical.com>
3 files changed