diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2015-02-13 13:16:37 -0500 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2015-03-18 13:41:57 -0400 |
commit | 932e468a377f62569fe3818f160fadbaef3f26bd (patch) | |
tree | 8bbd65f30c4852a8a08547a23bfda51efb5c8631 | |
parent | 28666d6dc3feca2b1983e6011df383299d8b6b64 (diff) |
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 <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
-rw-r--r-- | fs/gfs2/acl.c | 6 |
1 files changed, 1 insertions, 5 deletions
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) | |||
110 | error = __gfs2_xattr_set(inode, name, data, len, 0, GFS2_EATYPE_SYS); | 110 | error = __gfs2_xattr_set(inode, name, data, len, 0, GFS2_EATYPE_SYS); |
111 | if (error) | 111 | if (error) |
112 | goto out; | 112 | goto out; |
113 | 113 | set_cached_acl(inode, type, acl); | |
114 | if (acl) | ||
115 | set_cached_acl(inode, type, acl); | ||
116 | else | ||
117 | forget_cached_acl(inode, type); | ||
118 | out: | 114 | out: |
119 | kfree(data); | 115 | kfree(data); |
120 | return error; | 116 | return error; |