diff options
author | Eric Paris <eparis@redhat.com> | 2009-12-17 21:24:27 -0500 |
---|---|---|
committer | Eric Paris <eparis@redhat.com> | 2010-07-28 09:58:57 -0400 |
commit | ba643f04cdda170215c8820acd3e201936fc512d (patch) | |
tree | ad871aa57096cd228f666405f370170f70b26968 /fs/notify/mark.c | |
parent | 5444e2981c31d0ed7465475e451b8437084337e5 (diff) | |
download | op-kernel-dev-ba643f04cdda170215c8820acd3e201936fc512d.zip op-kernel-dev-ba643f04cdda170215c8820acd3e201936fc512d.tar.gz |
fsnotify: clear marks to 0 in fsnotify_init_mark
Currently fsnotify_init_mark sets some fields to 0/NULL. Some users
already used some sorts of zalloc, some didn't. This patch uses memset to
explicitly zero everything in the fsnotify_mark when it is initialized so we
don't have to be careful if fields are later added to marks.
Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'fs/notify/mark.c')
-rw-r--r-- | fs/notify/mark.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/notify/mark.c b/fs/notify/mark.c index e56e8768..57bb1d7 100644 --- a/fs/notify/mark.c +++ b/fs/notify/mark.c @@ -284,11 +284,8 @@ void fsnotify_duplicate_mark(struct fsnotify_mark *new, struct fsnotify_mark *ol void fsnotify_init_mark(struct fsnotify_mark *mark, void (*free_mark)(struct fsnotify_mark *mark)) { + memset(mark, 0, sizeof(*mark)); spin_lock_init(&mark->lock); atomic_set(&mark->refcnt, 1); - INIT_HLIST_NODE(&mark->i.i_list); - mark->group = NULL; - mark->mask = 0; - mark->i.inode = NULL; mark->free_mark = free_mark; } |