diff options
author | Jan Kara <jack@suse.cz> | 2017-03-15 05:08:28 -0400 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2017-04-10 11:37:35 -0400 |
commit | 2629718dd26f89e064dcdec6c8e5b9713502e1f8 (patch) | |
tree | 8a5ac343005713bbaa212c368751dd7c063aed57 | |
parent | 73cd3c33ab793325ebaae27fa58b4f713c16f12c (diff) |
fsnotify: Remove useless list deletion and comment
After removing all the indirection it is clear that
hlist_del_init_rcu(&mark->obj_list);
in fsnotify_destroy_marks() is not needed as the mark gets removed from
the list shortly afterwards in fsnotify_destroy_mark() ->
fsnotify_detach_mark() -> fsnotify_detach_from_object(). Also there is
no problem with mark being visible on object list while we call
fsnotify_destroy_mark() as parallel destruction of marks from several
places is properly handled (as mentioned in the comment in
fsnotify_destroy_marks(). So just remove the list removal and also the
stale comment.
Reviewed-by: Miklos Szeredi <mszeredi@redhat.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r-- | fs/notify/mark.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/fs/notify/mark.c b/fs/notify/mark.c index 416ba91750a9..b5b641a2b557 100644 --- a/fs/notify/mark.c +++ b/fs/notify/mark.c | |||
@@ -620,12 +620,6 @@ void fsnotify_destroy_marks(struct fsnotify_mark_connector *conn) | |||
620 | } | 620 | } |
621 | mark = hlist_entry(conn->list.first, struct fsnotify_mark, | 621 | mark = hlist_entry(conn->list.first, struct fsnotify_mark, |
622 | obj_list); | 622 | obj_list); |
623 | /* | ||
624 | * We don't update i_fsnotify_mask / mnt_fsnotify_mask here | ||
625 | * since inode / mount is going away anyway. So just remove | ||
626 | * mark from the list. | ||
627 | */ | ||
628 | hlist_del_init_rcu(&mark->obj_list); | ||
629 | fsnotify_get_mark(mark); | 623 | fsnotify_get_mark(mark); |
630 | spin_unlock(lock); | 624 | spin_unlock(lock); |
631 | fsnotify_destroy_mark(mark, mark->group); | 625 | fsnotify_destroy_mark(mark, mark->group); |