LCOV - code coverage report
Current view: top level - fs/notify/inotify - inotify.h (source / functions) Hit Total Coverage
Test: landlock.info Lines: 9 9 100.0 %
Date: 2021-04-22 12:43:58 Functions: 0 0 -

          Line data    Source code
       1             : /* SPDX-License-Identifier: GPL-2.0 */
       2             : #include <linux/fsnotify_backend.h>
       3             : #include <linux/inotify.h>
       4             : #include <linux/slab.h> /* struct kmem_cache */
       5             : 
       6             : struct inotify_event_info {
       7             :         struct fsnotify_event fse;
       8             :         u32 mask;
       9             :         int wd;
      10             :         u32 sync_cookie;
      11             :         int name_len;
      12             :         char name[];
      13             : };
      14             : 
      15             : struct inotify_inode_mark {
      16             :         struct fsnotify_mark fsn_mark;
      17             :         int wd;
      18             : };
      19             : 
      20         483 : static inline struct inotify_event_info *INOTIFY_E(struct fsnotify_event *fse)
      21             : {
      22         483 :         return container_of(fse, struct inotify_event_info, fse);
      23             : }
      24             : 
      25             : extern void inotify_ignored_and_remove_idr(struct fsnotify_mark *fsn_mark,
      26             :                                            struct fsnotify_group *group);
      27             : extern int inotify_handle_inode_event(struct fsnotify_mark *inode_mark,
      28             :                                       u32 mask, struct inode *inode,
      29             :                                       struct inode *dir,
      30             :                                       const struct qstr *name, u32 cookie);
      31             : 
      32             : extern const struct fsnotify_ops inotify_fsnotify_ops;
      33             : extern struct kmem_cache *inotify_inode_mark_cachep;
      34             : 
      35             : #ifdef CONFIG_INOTIFY_USER
      36           7 : static inline void dec_inotify_instances(struct ucounts *ucounts)
      37             : {
      38           7 :         dec_ucount(ucounts, UCOUNT_INOTIFY_INSTANCES);
      39           7 : }
      40             : 
      41          86 : static inline struct ucounts *inc_inotify_watches(struct ucounts *ucounts)
      42             : {
      43          86 :         return inc_ucount(ucounts->ns, ucounts->uid, UCOUNT_INOTIFY_WATCHES);
      44             : }
      45             : 
      46          37 : static inline void dec_inotify_watches(struct ucounts *ucounts)
      47             : {
      48          37 :         dec_ucount(ucounts, UCOUNT_INOTIFY_WATCHES);
      49             : }
      50             : #endif

Generated by: LCOV version 1.14