]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
[XFS] optimize dmapi event tests w/o dmapi config
authorEric Sandeen <sandeen@sandeen.net>
Thu, 23 Aug 2007 06:19:57 +0000 (16:19 +1000)
committerTim Shimmin <tes@chook.melbourne.sgi.com>
Mon, 15 Oct 2007 06:45:55 +0000 (16:45 +1000)
SGI-PV: 969372
SGI-Modid: xfs-linux-melb:xfs-kern:29444a

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Signed-off-by: Vlad Apostolov <vapo@sgi.com>
Signed-off-by: Tim Shimmin <tes@sgi.com>
fs/xfs/xfs_dmapi.h
fs/xfs/xfs_vfsops.c

index 988cf446d9e7ca1973a044083d52b2476824a644..98b4d6325a20ddec91900c5bba18052f19434d40 100644 (file)
@@ -67,11 +67,15 @@ typedef enum {
 #define HAVE_DM_RIGHT_T
 
 /* Defines for determining if an event message should be sent. */
+#ifdef HAVE_DMAPI
 #define        DM_EVENT_ENABLED(ip, event) ( \
        unlikely (XFS_MTOVFS((ip)->i_mount)->vfs_flag & VFS_DMI) && \
                ( ((ip)->i_d.di_dmevmask & (1 << event)) || \
                  ((ip)->i_mount->m_dmevmask & (1 << event)) ) \
        )
+#else
+#define DM_EVENT_ENABLED(ip, event)    (0)
+#endif
 
 #define DM_XFS_VALID_FS_EVENTS         ( \
        (1 << DM_EVENT_PREUNMOUNT)      | \
index ba8f7a3e40281709690456c6a756b9ee2dc7c8db..4a27648b544628b11bd3fb26000097090604d622 100644 (file)
@@ -572,6 +572,7 @@ xfs_unmount(
        rip = mp->m_rootip;
        rvp = XFS_ITOV(rip);
 
+#ifdef HAVE_DMAPI
        if (vfsp->vfs_flag & VFS_DMI) {
                error = XFS_SEND_PREUNMOUNT(mp, vfsp,
                                rvp, DM_RIGHT_NULL, rvp, DM_RIGHT_NULL,
@@ -584,7 +585,7 @@ xfs_unmount(
                unmount_event_flags = (mp->m_dmevmask & (1<<DM_EVENT_UNMOUNT))?
                                        0 : DM_FLAGS_UNWANTED;
        }
-
+#endif
        /*
         * First blow any referenced inode from this file system
         * out of the reference cache, and delete the timer.