Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=948c6d4fd894d9c7f9ad764cedbe443aa866def2 Commit: 948c6d4fd894d9c7f9ad764cedbe443aa866def2 Parent: eb9df39daf870d6f9e9528f092d506be04ebad2f Author: Eric Sandeen <[EMAIL PROTECTED]> AuthorDate: Thu Aug 23 16:19:57 2007 +1000 Committer: Tim Shimmin <[EMAIL PROTECTED]> CommitDate: Mon Oct 15 16:45:55 2007 +1000
[XFS] optimize dmapi event tests w/o dmapi config SGI-PV: 969372 SGI-Modid: xfs-linux-melb:xfs-kern:29444a Signed-off-by: Eric Sandeen <[EMAIL PROTECTED]> Signed-off-by: Vlad Apostolov <[EMAIL PROTECTED]> Signed-off-by: Tim Shimmin <[EMAIL PROTECTED]> --- fs/xfs/xfs_dmapi.h | 4 ++++ fs/xfs/xfs_vfsops.c | 3 ++- 2 files changed, 6 insertions(+), 1 deletions(-) diff --git a/fs/xfs/xfs_dmapi.h b/fs/xfs/xfs_dmapi.h index 988cf44..98b4d63 100644 --- a/fs/xfs/xfs_dmapi.h +++ b/fs/xfs/xfs_dmapi.h @@ -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) | \ diff --git a/fs/xfs/xfs_vfsops.c b/fs/xfs/xfs_vfsops.c index ba8f7a3..4a27648 100644 --- a/fs/xfs/xfs_vfsops.c +++ b/fs/xfs/xfs_vfsops.c @@ -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. - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html