From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-yb0-f193.google.com ([209.85.213.193]:33216 "EHLO mail-yb0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726487AbeGKKwm (ORCPT ); Wed, 11 Jul 2018 06:52:42 -0400 Received: by mail-yb0-f193.google.com with SMTP id e84-v6so9825068ybb.0 for ; Wed, 11 Jul 2018 03:48:59 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20180710100217.12866-1-jack@suse.cz> <20180710100217.12866-10-jack@suse.cz> From: Amir Goldstein Date: Wed, 11 Jul 2018 13:48:58 +0300 Message-ID: Subject: Re: [PATCH 09/10] audit: Allocate fsnotify mark independently of chunk To: Jan Kara Cc: Linux Audit , Paul Moore , linux-fsdevel , Al Viro , Richard Guy Briggs Content-Type: text/plain; charset="UTF-8" Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Wed, Jul 11, 2018 at 11:57 AM, Amir Goldstein wrote: > On Tue, Jul 10, 2018 at 1:02 PM, Jan Kara wrote: >> Allocate fsnotify mark independently instead of embedding it inside >> chunk. This will allow us to just replace chunk attached to mark when >> growing / shrinking chunk instead of replacing mark attached to inode >> which is a more complex operation. >> >> Signed-off-by: Jan Kara > > Ack. Found minor nit. [...] >> +static inline struct audit_tree_mark *AUDIT_M(struct fsnotify_mark *entry) >> +{ >> + return container_of(entry, struct audit_tree_mark, fsn_mark); >> +} >> + >> static void audit_tree_destroy_watch(struct fsnotify_mark *entry) >> { >> - struct audit_chunk *chunk = container_of(entry, struct audit_chunk, mark); >> + struct audit_chunk *chunk = AUDIT_M(entry)->chunk; >> audit_mark_put_chunk(chunk); >> + kmem_cache_free(audit_tree_mark_cachep, entry); Technically, we should be freeing AUDIT_M(entry) although it is the same address with current struct layout. Thanks, Amir.