From 932e468a377f62569fe3818f160fadbaef3f26bd Mon Sep 17 00:00:00 2001 From: Andreas Gruenbacher Date: Fri, 13 Feb 2015 12:16:37 -0600 Subject: GFS2: gfs2_set_acl(): Cache "no acl" as well When removing a default acl or setting an access acl that is entirely represented in the file mode, we end up with acl == NULL in gfs2_set_acl(). In that case, bring gfs2 in line with other file systems and cache the NULL acl with set_cached_acl() instead of invalidating the cache with forget_cached_acl(). Signed-off-by: Andreas Gruenbacher Signed-off-by: Bob Peterson --- fs/gfs2/acl.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'fs/gfs2') diff --git a/fs/gfs2/acl.c b/fs/gfs2/acl.c index 7b3143064af1..1be3b061c05c 100644 --- a/fs/gfs2/acl.c +++ b/fs/gfs2/acl.c @@ -110,11 +110,7 @@ int gfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type) error = __gfs2_xattr_set(inode, name, data, len, 0, GFS2_EATYPE_SYS); if (error) goto out; - - if (acl) - set_cached_acl(inode, type, acl); - else - forget_cached_acl(inode, type); + set_cached_acl(inode, type, acl); out: kfree(data); return error; -- cgit v1.2.3