aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2015-12-24 11:09:40 -0500
committerPaul Moore <pmoore@redhat.com>2015-12-24 11:09:40 -0500
commitf39814f60ad0fa982ac87a97af1fb0bde244c319 (patch)
treed94a0928843a74efeaf5fe89b52be3ed38a9d0da
parent5d226df4edfa0eb1e689e7ac2741cf261ff7cbf1 (diff)
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 <agruenba@redhat.com> Acked-by: Bob Peterson <rpeterso@redhat.com> Acked-by: Steven Whitehouse <swhiteho@redhat.com> Cc: cluster-devel@redhat.com [PM: fixed spelling errors and description line lengths] Signed-off-by: Paul Moore <pmoore@redhat.com>
-rw-r--r--fs/gfs2/glops.c2
1 files changed, 2 insertions, 0 deletions
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 @@
13#include <linux/gfs2_ondisk.h> 13#include <linux/gfs2_ondisk.h>
14#include <linux/bio.h> 14#include <linux/bio.h>
15#include <linux/posix_acl.h> 15#include <linux/posix_acl.h>
16#include <linux/security.h>
16 17
17#include "gfs2.h" 18#include "gfs2.h"
18#include "incore.h" 19#include "incore.h"
@@ -262,6 +263,7 @@ static void inode_go_inval(struct gfs2_glock *gl, int flags)
262 if (ip) { 263 if (ip) {
263 set_bit(GIF_INVALID, &ip->i_flags); 264 set_bit(GIF_INVALID, &ip->i_flags);
264 forget_all_cached_acls(&ip->i_inode); 265 forget_all_cached_acls(&ip->i_inode);
266 security_inode_invalidate_secctx(&ip->i_inode);
265 gfs2_dir_hash_inval(ip); 267 gfs2_dir_hash_inval(ip);
266 } 268 }
267 } 269 }