aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAmir Goldstein <[email protected]>2024-03-17 20:41:47 +0200
committerJan Kara <[email protected]>2024-04-04 16:24:16 +0200
commit230d97d39ee2eb9030309f04f98615aaeb420dac (patch)
tree3039b93f15d188dcd686260ca2c3b44e49b18dfd /include
parentf115815d75332f9dabb0d7c29c8f67b0f26889c5 (diff)
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 <[email protected]> Signed-off-by: Jan Kara <[email protected]> Message-Id: <[email protected]>
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);