]> asedeno.scripts.mit.edu Git - linux.git/commit
fsnotify: use type id to identify connector object type
authorAmir Goldstein <amir73il@gmail.com>
Fri, 20 Apr 2018 23:10:49 +0000 (16:10 -0700)
committerJan Kara <jack@suse.cz>
Fri, 18 May 2018 12:58:22 +0000 (14:58 +0200)
commitd6f7b98bc8147abd290ead82922f8d83c525fb42
treeca48d6cfca27bb48e0639fc2674cd35edc4ccc6d
parent3acf4e395260e3bd30a6fa29ba7eada4bf7566ca
fsnotify: use type id to identify connector object type

An fsnotify_mark_connector is referencing a single type of object
(either inode or vfsmount). Instead of storing a type mask in
connector->flags, store a single type id in connector->type to
identify the type of object.

When a connector object is detached from the object, its type is set
to FSNOTIFY_OBJ_TYPE_DETACHED and this object is not going to be
reused.

The function fsnotify_clear_marks_by_group() is the only place where
type mask was used, so use type flags instead of type id to this
function.

This change is going to be more convenient when adding a new object
type (super block).

Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
fs/notify/fdinfo.c
fs/notify/group.c
fs/notify/mark.c
include/linux/fsnotify_backend.h