diff options
author | Amir Goldstein <amir73il@gmail.com> | 2019-01-10 19:04:37 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2019-02-07 16:38:35 +0100 |
commit | 77115225acc67d9ac4b15f04dd138006b9cd1ef2 (patch) | |
tree | 6f5bce4240d6975c10ffee2d447035b1783b0e38 /fs/hfsplus/tables.c | |
parent | a8b13aa20afb69161b5123b4f1acc7ea0a03d360 (diff) | |
download | linux-77115225acc67d9ac4b15f04dd138006b9cd1ef2.tar.bz2 |
fanotify: cache fsid in fsnotify_mark_connector
For FAN_REPORT_FID, we need to encode fid with fsid of the filesystem on
every event. To avoid having to call vfs_statfs() on every event to get
fsid, we store the fsid in fsnotify_mark_connector on the first time we
add a mark and on handle event we use the cached fsid.
Subsequent calls to add mark on the same object are expected to pass the
same fsid, so the call will fail on cached fsid mismatch.
If an event is reported on several mark types (inode, mount, filesystem),
all connectors should already have the same fsid, so we use the cached
fsid from the first connector.
[JK: Simplify code flow around fanotify_get_fid()
make fsid argument of fsnotify_add_mark_locked() unconditional]
Suggested-by: Jan Kara <jack@suse.cz>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/hfsplus/tables.c')
0 files changed, 0 insertions, 0 deletions