aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/xfs/xfs_dmapi.h4
-rw-r--r--fs/xfs/xfs_vfsops.c3
2 files changed, 6 insertions, 1 deletions
diff --git a/fs/xfs/xfs_dmapi.h b/fs/xfs/xfs_dmapi.h
index 988cf446d9e7..98b4d6325a20 100644
--- a/fs/xfs/xfs_dmapi.h
+++ b/fs/xfs/xfs_dmapi.h
@@ -67,11 +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#ifdef HAVE_DMAPI
70#define DM_EVENT_ENABLED(ip, event) ( \ 71#define DM_EVENT_ENABLED(ip, event) ( \
71 unlikely (XFS_MTOVFS((ip)->i_mount)->vfs_flag & VFS_DMI) && \ 72 unlikely (XFS_MTOVFS((ip)->i_mount)->vfs_flag & VFS_DMI) && \
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 )
76#else
77#define DM_EVENT_ENABLED(ip, event) (0)
78#endif
75 79
76#define DM_XFS_VALID_FS_EVENTS ( \ 80#define DM_XFS_VALID_FS_EVENTS ( \
77 (1 << DM_EVENT_PREUNMOUNT) | \ 81 (1 << DM_EVENT_PREUNMOUNT) | \
diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c
index ba8f7a3e4028..4a27648b5446 100644
--- a/fs/xfs/xfs_vfsops.c
+++ b/fs/xfs/xfs_vfsops.c
@@ -572,6 +572,7 @@ xfs_unmount(
572 rip = mp->m_rootip; 572 rip = mp->m_rootip;
573 rvp = XFS_ITOV(rip); 573 rvp = XFS_ITOV(rip);
574 574
575#ifdef HAVE_DMAPI
575 if (vfsp->vfs_flag & VFS_DMI) { 576 if (vfsp->vfs_flag & VFS_DMI) {
576 error = XFS_SEND_PREUNMOUNT(mp, vfsp, 577 error = XFS_SEND_PREUNMOUNT(mp, vfsp,
577 rvp, DM_RIGHT_NULL, rvp, DM_RIGHT_NULL, 578 rvp, DM_RIGHT_NULL, rvp, DM_RIGHT_NULL,
@@ -584,7 +585,7 @@ xfs_unmount(
584 unmount_event_flags = (mp->m_dmevmask & (1<<DM_EVENT_UNMOUNT))? 585 unmount_event_flags = (mp->m_dmevmask & (1<<DM_EVENT_UNMOUNT))?
585 0 : DM_FLAGS_UNWANTED; 586 0 : DM_FLAGS_UNWANTED;
586 } 587 }
587 588#endif
588 /* 589 /*
589 * First blow any referenced inode from this file system 590 * First blow any referenced inode from this file system
590 * out of the reference cache, and delete the timer. 591 * out of the reference cache, and delete the timer.