summaryrefslogtreecommitdiff
path: root/fs/notify/fanotify/fanotify_user.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2020-03-24 21:35:07 +0300
committerJan Kara <jack@suse.cz>2020-03-25 12:27:16 +0300
commit01affd5471dcab04c6cb0c2acaf132a20488f86f (patch)
treef3f42caaadc86a377c61ca3fa1d8fc62c6f03d9f /fs/notify/fanotify/fanotify_user.c
parentd766b553615ce67f33848ec4f6672b3158198a5c (diff)
downloadlinux-01affd5471dcab04c6cb0c2acaf132a20488f86f.tar.xz
fanotify: Drop fanotify_event_has_fid()
When some events have directory id and some object id, fanotify_event_has_fid() becomes mostly useless and confusing because we usually need to know which type of file handle the event has. So just drop the function and use fanotify_event_object_fh() instead. Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/notify/fanotify/fanotify_user.c')
-rw-r--r--fs/notify/fanotify/fanotify_user.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
index 3a11f6a0339f..b93585406aad 100644
--- a/fs/notify/fanotify/fanotify_user.c
+++ b/fs/notify/fanotify/fanotify_user.c
@@ -275,7 +275,7 @@ static ssize_t copy_event_to_user(struct fsnotify_group *group,
metadata.mask = event->mask & FANOTIFY_OUTGOING_EVENTS;
metadata.pid = pid_vnr(event->pid);
- if (fanotify_event_has_fid(event)) {
+ if (fanotify_event_object_fh(event)) {
metadata.event_len += fanotify_event_info_len(event);
} else if (path && path->mnt && path->dentry) {
fd = create_fd(group, path, &f);
@@ -300,7 +300,7 @@ static ssize_t copy_event_to_user(struct fsnotify_group *group,
if (f) {
fd_install(fd, f);
- } else if (fanotify_event_has_fid(event)) {
+ } else if (fanotify_event_object_fh(event)) {
ret = copy_fid_to_user(fanotify_event_fsid(event),
fanotify_event_object_fh(event),
buf + FAN_EVENT_METADATA_LEN);