[PATCH] libata: Move ata_probe_ent_alloc to libata_core
[deliverable/linux.git] / include / linux / dnotify.h
CommitLineData
1da177e4
LT
1#ifndef _LINUX_DNOTIFY_H
2#define _LINUX_DNOTIFY_H
3/*
4 * Directory notification for Linux
5 *
6 * Copyright (C) 2000,2002 Stephen Rothwell
7 */
8
9#include <linux/fs.h>
10
11struct dnotify_struct {
12 struct dnotify_struct * dn_next;
13 unsigned long dn_mask;
14 int dn_fd;
15 struct file * dn_filp;
16 fl_owner_t dn_owner;
17};
18
19#ifdef __KERNEL__
20
1da177e4
LT
21
22#ifdef CONFIG_DNOTIFY
23
24extern void __inode_dir_notify(struct inode *, unsigned long);
25extern void dnotify_flush(struct file *, fl_owner_t);
26extern int fcntl_dirnotify(int, struct file *, unsigned long);
27extern void dnotify_parent(struct dentry *, unsigned long);
28
29static inline void inode_dir_notify(struct inode *inode, unsigned long event)
30{
31 if (inode->i_dnotify_mask & (event))
32 __inode_dir_notify(inode, event);
33}
34
35#else
36
37static inline void __inode_dir_notify(struct inode *inode, unsigned long event)
38{
39}
40
41static inline void dnotify_flush(struct file *filp, fl_owner_t id)
42{
43}
44
45static inline int fcntl_dirnotify(int fd, struct file *filp, unsigned long arg)
46{
47 return -EINVAL;
48}
49
50static inline void dnotify_parent(struct dentry *dentry, unsigned long event)
51{
52}
53
54static inline void inode_dir_notify(struct inode *inode, unsigned long event)
55{
56}
57
58#endif /* CONFIG_DNOTIFY */
59
60#endif /* __KERNEL __ */
61
62#endif /* _LINUX_DNOTIFY_H */
This page took 0.163393 seconds and 5 git commands to generate.