From: Andreas Gruenbacher Date: Thu, 24 Dec 2015 16:09:40 +0000 (-0500) Subject: gfs2: Invalid security labels of inodes when they go invalid X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=f39814f60ad0fa982ac87a97af1fb0bde244c319;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git gfs2: Invalid security labels of inodes when they go invalid When gfs2 releases the glock of an inode, it must invalidate all information cached for that inode, including the page cache and acls. Use the new security_inode_invalidate_secctx hook to also invalidate security labels in that case. These items will be reread from disk when needed after reacquiring the glock. Signed-off-by: Andreas Gruenbacher Acked-by: Bob Peterson Acked-by: Steven Whitehouse Cc: cluster-devel@redhat.com [PM: fixed spelling errors and description line lengths] Signed-off-by: Paul Moore --- diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index f348cfb6b69a..437fd73e381e 100644 --- a/fs/gfs2/glops.c +++ b/fs/gfs2/glops.c @@ -13,6 +13,7 @@ #include #include #include +#include #include "gfs2.h" #include "incore.h" @@ -262,6 +263,7 @@ static void inode_go_inval(struct gfs2_glock *gl, int flags) if (ip) { set_bit(GIF_INVALID, &ip->i_flags); forget_all_cached_acls(&ip->i_inode); + security_inode_invalidate_secctx(&ip->i_inode); gfs2_dir_hash_inval(ip); } }