summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2024-03-17 21:41:47 +0300
committerJan Kara <jack@suse.cz>2024-04-04 17:24:16 +0300
commit230d97d39ee2eb9030309f04f98615aaeb420dac (patch)
tree3039b93f15d188dcd686260ca2c3b44e49b18dfd /include
parentf115815d75332f9dabb0d7c29c8f67b0f26889c5 (diff)
downloadlinux-230d97d39ee2eb9030309f04f98615aaeb420dac.tar.xz
fsnotify: create a wrapper fsnotify_find_inode_mark()
In preparation to passing an object pointer to fsnotify_find_mark(), add a wrapper fsnotify_find_inode_mark() and use it where possible. Signed-off-by: Amir Goldstein <amir73il@gmail.com> Signed-off-by: Jan Kara <jack@suse.cz> Message-Id: <20240317184154.1200192-4-amir73il@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/fsnotify_backend.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/fsnotify_backend.h b/include/linux/fsnotify_backend.h
index d4e3bc55d174..992b57a7e95f 100644
--- a/include/linux/fsnotify_backend.h
+++ b/include/linux/fsnotify_backend.h
@@ -789,6 +789,13 @@ static inline int fsnotify_add_inode_mark_locked(struct fsnotify_mark *mark,
FSNOTIFY_OBJ_TYPE_INODE, add_flags);
}
+static inline struct fsnotify_mark *fsnotify_find_inode_mark(
+ struct inode *inode,
+ struct fsnotify_group *group)
+{
+ return fsnotify_find_mark(&inode->i_fsnotify_marks, group);
+}
+
/* given a group and a mark, flag mark to be freed when all references are dropped */
extern void fsnotify_destroy_mark(struct fsnotify_mark *mark,
struct fsnotify_group *group);