Skip to content

Commit 56b27cf

Browse files
jankaratorvalds
authored andcommitted
fsnotify: remove pointless NULL initializers
We usually rely on the fact that struct members not specified in the initializer are set to NULL. So do that with fsnotify function pointers as well. Signed-off-by: Jan Kara <jack@suse.cz> Reviewed-by: Christoph Hellwig <hch@lst.de> Cc: Eric Paris <eparis@parisplace.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 83c4c4b commit 56b27cf

4 files changed

Lines changed: 0 additions & 9 deletions

File tree

‎fs/notify/dnotify/dnotify.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,6 @@ static void dnotify_free_mark(struct fsnotify_mark *fsn_mark)
138138

139139
static struct fsnotify_ops dnotify_fsnotify_ops = {
140140
.handle_event = dnotify_handle_event,
141-
.free_group_priv = NULL,
142-
.freeing_mark = NULL,
143-
.free_event = NULL,
144141
};
145142

146143
/*

‎fs/notify/fanotify/fanotify.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,5 +230,4 @@ const struct fsnotify_ops fanotify_fsnotify_ops = {
230230
.handle_event = fanotify_handle_event,
231231
.free_group_priv = fanotify_free_group_priv,
232232
.free_event = fanotify_free_event,
233-
.freeing_mark = NULL,
234233
};

‎kernel/audit_tree.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -936,8 +936,6 @@ static void audit_tree_freeing_mark(struct fsnotify_mark *entry, struct fsnotify
936936

937937
static const struct fsnotify_ops audit_tree_ops = {
938938
.handle_event = audit_tree_handle_event,
939-
.free_group_priv = NULL,
940-
.free_event = NULL,
941939
.freeing_mark = audit_tree_freeing_mark,
942940
};
943941

‎kernel/audit_watch.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -505,9 +505,6 @@ static int audit_watch_handle_event(struct fsnotify_group *group,
505505

506506
static const struct fsnotify_ops audit_watch_fsnotify_ops = {
507507
.handle_event = audit_watch_handle_event,
508-
.free_group_priv = NULL,
509-
.freeing_mark = NULL,
510-
.free_event = NULL,
511508
};
512509

513510
static int __init audit_watch_init(void)

0 commit comments

Comments
 (0)