summaryrefslogtreecommitdiffstats
path: root/fs/notify/fsnotify.h
diff options
context:
space:
mode:
authorAmir Goldstein2018-06-23 16:54:49 +0200
committerJan Kara2018-06-27 13:45:05 +0200
commit36f10f55ff1d2867bfc48ed898a9cc0dc6b49dd2 (patch)
tree0b7a840c5c8e0b2bd44aeca2c21a144b25d89457 /fs/notify/fsnotify.h
parentfsnotify: pass connp and object type to fsnotify_add_mark() (diff)
downloadkernel-qcow2-linux-36f10f55ff1d2867bfc48ed898a9cc0dc6b49dd2.tar.gz
kernel-qcow2-linux-36f10f55ff1d2867bfc48ed898a9cc0dc6b49dd2.tar.xz
kernel-qcow2-linux-36f10f55ff1d2867bfc48ed898a9cc0dc6b49dd2.zip
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/fsnotify.h')
-rw-r--r--fs/notify/fsnotify.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/fs/notify/fsnotify.h b/fs/notify/fsnotify.h
index caeee042d1cc..7902653dd577 100644
--- a/fs/notify/fsnotify.h
+++ b/fs/notify/fsnotify.h
@@ -9,14 +9,16 @@
#include "../mount.h"
-static inline struct inode *fsnotify_obj_inode(fsnotify_connp_t *connp)
+static inline struct inode *fsnotify_conn_inode(
+ struct fsnotify_mark_connector *conn)
{
- return container_of(connp, struct inode, i_fsnotify_marks);
+ return container_of(conn->obj, struct inode, i_fsnotify_marks);
}
-static inline struct mount *fsnotify_obj_mount(fsnotify_connp_t *connp)
+static inline struct mount *fsnotify_conn_mount(
+ struct fsnotify_mark_connector *conn)
{
- return container_of(connp, struct mount, mnt_fsnotify_marks);
+ return container_of(conn->obj, struct mount, mnt_fsnotify_marks);
}
/* destroy all events sitting in this groups notification queue */