Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 24972f1e authored by Dmitry Eremin's avatar Dmitry Eremin Committed by Greg Kroah-Hartman
Browse files

staging: lustre: llite: allow cached acls



Move the freeing of all cached acls from ll_get_acl() to the
function ll_clear_inode(). This way we free all cached acls
for the inode just before clearing it. This allow us to take
advantage of cached acls and correctly free them before free.

Signed-off-by: default avatarDmitry Eremin <dmitry.eremin@intel.com>
Reviewed-on: https://review.whamcloud.com/25965
Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-9183


Reviewed-by: default avatarBob Glossman <bob.glossman@intel.com>
Reviewed-by: default avatarJames Simmons <uja.ornl@yahoo.com>
Reviewed-by: default avatarOleg Drokin <oleg.drokin@intel.com>
Signed-off-by: default avatarJames Simmons <jsimmons@infradead.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 62cbe860
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -3035,9 +3035,6 @@ struct posix_acl *ll_get_acl(struct inode *inode, int type)
	spin_lock(&lli->lli_lock);
	spin_lock(&lli->lli_lock);
	/* VFS' acl_permission_check->check_acl will release the refcount */
	/* VFS' acl_permission_check->check_acl will release the refcount */
	acl = posix_acl_dup(lli->lli_posix_acl);
	acl = posix_acl_dup(lli->lli_posix_acl);
#ifdef CONFIG_FS_POSIX_ACL
	forget_cached_acl(inode, type);
#endif
	spin_unlock(&lli->lli_lock);
	spin_unlock(&lli->lli_lock);


	return acl;
	return acl;
+1 −0
Original line number Original line Diff line number Diff line
@@ -1316,6 +1316,7 @@ void ll_clear_inode(struct inode *inode)
	ll_xattr_cache_destroy(inode);
	ll_xattr_cache_destroy(inode);


#ifdef CONFIG_FS_POSIX_ACL
#ifdef CONFIG_FS_POSIX_ACL
	forget_all_cached_acls(inode);
	if (lli->lli_posix_acl) {
	if (lli->lli_posix_acl) {
		posix_acl_release(lli->lli_posix_acl);
		posix_acl_release(lli->lli_posix_acl);
		lli->lli_posix_acl = NULL;
		lli->lli_posix_acl = NULL;