lkml.org 
[lkml]   [2023]   [Sep]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH 1/1] audit: remove redundant 'fsnotify_put_mark'
Date
Sorry, pls ignore this patch. 
I misunderstood the difference between 'audit_alloc_mark' & 'audit_init_parent'.
'fsnotify_put_mark' in 'fsnotify_add_mark_locked' is pair to 'fsnotify_get_mark'

On Wed, Sep 06, 2023 at 07:51:52PM -0600, Wu Bo wrote:
> 'fsnotify_add_inode_mark' has done 'fsnotify_put_mark' if error occurred.
> So here to call 'fsnotify_put_mark' is redundant.
>
> Signed-off-by: Wu Bo <bo.wu@vivo.com>
> ---
> kernel/audit_fsnotify.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/kernel/audit_fsnotify.c b/kernel/audit_fsnotify.c
> index c565fbf66ac8..ff1cdda27653 100644
> --- a/kernel/audit_fsnotify.c
> +++ b/kernel/audit_fsnotify.c
> @@ -103,7 +103,6 @@ struct audit_fsnotify_mark *audit_alloc_mark(struct audit_krule *krule, char *pa
> ret = fsnotify_add_inode_mark(&audit_mark->mark, inode, 0);
> if (ret < 0) {
> audit_mark->path = NULL;
> - fsnotify_put_mark(&audit_mark->mark);
> audit_mark = ERR_PTR(ret);
> }
> out:
> --
> 2.35.3
>

\
 
 \ /
  Last update: 2023-09-07 05:05    [W:0.047 / U:0.380 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site