diff options
Diffstat (limited to 'fs/xfs/xfs_dmapi.h')
-rw-r--r-- | fs/xfs/xfs_dmapi.h | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/fs/xfs/xfs_dmapi.h b/fs/xfs/xfs_dmapi.h index adc3d251240d..f71784ab6a60 100644 --- a/fs/xfs/xfs_dmapi.h +++ b/fs/xfs/xfs_dmapi.h | |||
@@ -67,17 +67,15 @@ typedef enum { | |||
67 | #define HAVE_DM_RIGHT_T | 67 | #define HAVE_DM_RIGHT_T |
68 | 68 | ||
69 | /* Defines for determining if an event message should be sent. */ | 69 | /* Defines for determining if an event message should be sent. */ |
70 | #define DM_EVENT_ENABLED(vfsp, ip, event) ( \ | 70 | #ifdef HAVE_DMAPI |
71 | unlikely ((vfsp)->vfs_flag & VFS_DMI) && \ | 71 | #define DM_EVENT_ENABLED(ip, event) ( \ |
72 | unlikely ((ip)->i_mount->m_flags & XFS_MOUNT_DMAPI) && \ | ||
72 | ( ((ip)->i_d.di_dmevmask & (1 << event)) || \ | 73 | ( ((ip)->i_d.di_dmevmask & (1 << event)) || \ |
73 | ((ip)->i_mount->m_dmevmask & (1 << event)) ) \ | 74 | ((ip)->i_mount->m_dmevmask & (1 << event)) ) \ |
74 | ) | 75 | ) |
75 | 76 | #else | |
76 | #define DM_EVENT_ENABLED_IO(vfsp, io, event) ( \ | 77 | #define DM_EVENT_ENABLED(ip, event) (0) |
77 | unlikely ((vfsp)->vfs_flag & VFS_DMI) && \ | 78 | #endif |
78 | ( ((io)->io_dmevmask & (1 << event)) || \ | ||
79 | ((io)->io_mount->m_dmevmask & (1 << event)) ) \ | ||
80 | ) | ||
81 | 79 | ||
82 | #define DM_XFS_VALID_FS_EVENTS ( \ | 80 | #define DM_XFS_VALID_FS_EVENTS ( \ |
83 | (1 << DM_EVENT_PREUNMOUNT) | \ | 81 | (1 << DM_EVENT_PREUNMOUNT) | \ |
@@ -170,7 +168,4 @@ typedef enum { | |||
170 | DM_FLAGS_NDELAY : 0) | 168 | DM_FLAGS_NDELAY : 0) |
171 | #define AT_DELAY_FLAG(f) ((f&ATTR_NONBLOCK) ? DM_FLAGS_NDELAY : 0) | 169 | #define AT_DELAY_FLAG(f) ((f&ATTR_NONBLOCK) ? DM_FLAGS_NDELAY : 0) |
172 | 170 | ||
173 | |||
174 | extern struct bhv_module_vfsops xfs_dmops; | ||
175 | |||
176 | #endif /* __XFS_DMAPI_H__ */ | 171 | #endif /* __XFS_DMAPI_H__ */ |