]> git.karo-electronics.de Git - karo-tx-linux.git/commit
inotify: Do not drop mark reference under idr_lock
authorJan Kara <jack@suse.cz>
Wed, 21 Dec 2016 10:50:39 +0000 (11:50 +0100)
committerJan Kara <jack@suse.cz>
Mon, 10 Apr 2017 15:37:35 +0000 (17:37 +0200)
commite7253760587e8523fe1e8ede092a620f1403f2e8
tree7bcf5c7a849efedfb497da81e044bbe958d88454
parent08991e83b7286635167bab40927665a90fb00d81
inotify: Do not drop mark reference under idr_lock

Dropping mark reference can result in mark being freed. Although it
should not happen in inotify_remove_from_idr() since caller should hold
another reference, just don't risk lock up just after WARN_ON
unnecessarily. Also fold do_inotify_remove_from_idr() into the single
callsite as that function really is just two lines of real code.

Reviewed-by: Miklos Szeredi <mszeredi@redhat.com>
Reviewed-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/notify/inotify/inotify_user.c