diff options
author | Jan Kara <jack@suse.cz> | 2016-11-09 14:54:20 +0100 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2017-04-10 17:37:35 +0200 |
commit | 11375145a70d69e871dd5b8fcadd5d1ee4162e7c (patch) | |
tree | 20adde2c3c5b003fcc6c201d71a2c3acde065255 /kernel/audit_tree.c | |
parent | e7253760587e8523fe1e8ede092a620f1403f2e8 (diff) | |
download | linux-11375145a70d69e871dd5b8fcadd5d1ee4162e7c.tar.bz2 |
fsnotify: Move queueing of mark for destruction into fsnotify_put_mark()
Currently we queue mark into a list of marks for destruction in
__fsnotify_free_mark() and keep the last mark reference dangling. After the
worker waits for SRCU period, it drops the last reference to the mark
which frees it. This scheme has the disadvantage that if we hold
reference to a mark and drop and reacquire SRCU lock, the mark can get
freed immediately which is slightly inconvenient and we will need to
avoid this in the future.
Move to a scheme where queueing of mark into a list of marks for
destruction happens when the last reference to the mark is dropped. Also
drop reference to the mark held by group list already when mark is
removed from that list instead of dropping it only from the destruction
worker.
Reviewed-by: Miklos Szeredi <mszeredi@redhat.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'kernel/audit_tree.c')
0 files changed, 0 insertions, 0 deletions