Linux-Fsdevel Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH V2 2/6 linux-next] notify: explicit shutdown initialization
@ 2020-05-12 18:17 Fabian Frederick
  2020-05-13 11:03 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2020-05-12 18:17 UTC (permalink / raw)
  To: jack, amir73il; +Cc: linux-fsdevel, Fabian Frederick

kzalloc should already do it but explicitly initialize group
shutdown variable to false.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
---
 fs/notify/group.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/fs/notify/group.c b/fs/notify/group.c
index 133f723aca07..f2cba2265061 100644
--- a/fs/notify/group.c
+++ b/fs/notify/group.c
@@ -130,6 +130,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
 	INIT_LIST_HEAD(&group->notification_list);
 	init_waitqueue_head(&group->notification_waitq);
 	group->max_events = UINT_MAX;
+	group->shutdown = false;
 
 	mutex_init(&group->mark_mutex);
 	INIT_LIST_HEAD(&group->marks_list);
-- 
2.26.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH V2 2/6 linux-next] notify: explicit shutdown initialization
  2020-05-12 18:17 [PATCH V2 2/6 linux-next] notify: explicit shutdown initialization Fabian Frederick
@ 2020-05-13 11:03 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2020-05-13 11:03 UTC (permalink / raw)
  To: Fabian Frederick; +Cc: jack, amir73il, linux-fsdevel

On Tue 12-05-20 20:17:40, Fabian Frederick wrote:
> kzalloc should already do it but explicitly initialize group
> shutdown variable to false.
> 
> Signed-off-by: Fabian Frederick <fabf@skynet.be>

I don't think this patch makes sence. false is defined to be 0. kzalloc is
there exactly so that we don't have to initialize fields that should be
zero.

								Honza

> ---
>  fs/notify/group.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/notify/group.c b/fs/notify/group.c
> index 133f723aca07..f2cba2265061 100644
> --- a/fs/notify/group.c
> +++ b/fs/notify/group.c
> @@ -130,6 +130,7 @@ struct fsnotify_group *fsnotify_alloc_group(const struct fsnotify_ops *ops)
>  	INIT_LIST_HEAD(&group->notification_list);
>  	init_waitqueue_head(&group->notification_waitq);
>  	group->max_events = UINT_MAX;
> +	group->shutdown = false;
>  
>  	mutex_init(&group->mark_mutex);
>  	INIT_LIST_HEAD(&group->marks_list);
> -- 
> 2.26.2
> 
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-05-13 11:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-12 18:17 [PATCH V2 2/6 linux-next] notify: explicit shutdown initialization Fabian Frederick
2020-05-13 11:03 ` Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).