summaryrefslogtreecommitdiffstats
path: root/fs/notify/fdinfo.c
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2018-06-23 17:54:49 +0300
committerJan Kara <jack@suse.cz>2018-06-27 13:45:05 +0200
commit36f10f55ff1d2867bfc48ed898a9cc0dc6b49dd2 (patch)
tree0b7a840c5c8e0b2bd44aeca2c21a144b25d89457 /fs/notify/fdinfo.c
parentb812a9f5896379b6cff2ac168ddb5b89037d8e78 (diff)
downloadlinux-36f10f55ff1d2867bfc48ed898a9cc0dc6b49dd2.tar.bz2
fsnotify: let connector point to an abstract object
Make the code to attach/detach a connector to object more generic by letting the fsnotify connector point to an abstract fsnotify_connp_t. Code that needs to dereference an inode or mount object now uses the helpers fsnotify_conn_{inode,mount}. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/notify/fdinfo.c')
-rw-r--r--fs/notify/fdinfo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/fs/notify/fdinfo.c b/fs/notify/fdinfo.c
index 10aac1942c9f..86fcf5814279 100644
--- a/fs/notify/fdinfo.c
+++ b/fs/notify/fdinfo.c
@@ -15,7 +15,7 @@
#include <linux/exportfs.h>
#include "inotify/inotify.h"
-#include "../fs/mount.h"
+#include "fsnotify.h"
#if defined(CONFIG_PROC_FS)
@@ -81,7 +81,7 @@ static void inotify_fdinfo(struct seq_file *m, struct fsnotify_mark *mark)
return;
inode_mark = container_of(mark, struct inotify_inode_mark, fsn_mark);
- inode = igrab(mark->connector->inode);
+ inode = igrab(fsnotify_conn_inode(mark->connector));
if (inode) {
/*
* IN_ALL_EVENTS represents all of the mask bits
@@ -117,7 +117,7 @@ static void fanotify_fdinfo(struct seq_file *m, struct fsnotify_mark *mark)
mflags |= FAN_MARK_IGNORED_SURV_MODIFY;
if (mark->connector->type == FSNOTIFY_OBJ_TYPE_INODE) {
- inode = igrab(mark->connector->inode);
+ inode = igrab(fsnotify_conn_inode(mark->connector));
if (!inode)
return;
seq_printf(m, "fanotify ino:%lx sdev:%x mflags:%x mask:%x ignored_mask:%x ",
@@ -127,7 +127,7 @@ static void fanotify_fdinfo(struct seq_file *m, struct fsnotify_mark *mark)
seq_putc(m, '\n');
iput(inode);
} else if (mark->connector->type == FSNOTIFY_OBJ_TYPE_VFSMOUNT) {
- struct mount *mnt = real_mount(mark->connector->mnt);
+ struct mount *mnt = fsnotify_conn_mount(mark->connector);
seq_printf(m, "fanotify mnt_id:%x mflags:%x mask:%x ignored_mask:%x\n",
mnt->mnt_id, mflags, mark->mask, mark->ignored_mask);