Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 175283
b: refs/heads/master
c: 30ac068
h: refs/heads/master
i:
  175281: a5ff595
  175279: 5b42dcc
v: v3
  • Loading branch information
Christoph Hellwig authored and Alex Elder committed Dec 11, 2009
1 parent 1ad7cb0 commit 7c51009
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0c3dc2b02a4996c13e26eb91296e8a309e0c6227
refs/heads/master: 30ac0683dd452ba273c8db92a74d8cf7aef981d8
22 changes: 2 additions & 20 deletions trunk/fs/xfs/linux-2.6/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1131,8 +1131,6 @@ xfs_fs_put_super(
struct super_block *sb)
{
struct xfs_mount *mp = XFS_M(sb);
struct xfs_inode *rip = mp->m_rootip;
int unmount_event_flags = 0;

xfs_syncd_stop(mp);

Expand All @@ -1148,20 +1146,7 @@ xfs_fs_put_super(
xfs_sync_attr(mp, 0);
}

#ifdef HAVE_DMAPI
if (mp->m_flags & XFS_MOUNT_DMAPI) {
unmount_event_flags =
(mp->m_dmevmask & (1 << DM_EVENT_UNMOUNT)) ?
0 : DM_FLAGS_UNWANTED;
/*
* Ignore error from dmapi here, first unmount is not allowed
* to fail anyway, and second we wouldn't want to fail a
* unmount because of dmapi.
*/
XFS_SEND_PREUNMOUNT(mp, rip, DM_RIGHT_NULL, rip, DM_RIGHT_NULL,
NULL, NULL, 0, 0, unmount_event_flags);
}
#endif
XFS_SEND_PREUNMOUNT(mp);

/*
* Blow away any referenced inode in the filestreams cache.
Expand All @@ -1172,10 +1157,7 @@ xfs_fs_put_super(

XFS_bflush(mp->m_ddev_targp);

if (mp->m_flags & XFS_MOUNT_DMAPI) {
XFS_SEND_UNMOUNT(mp, rip, DM_RIGHT_NULL, 0, 0,
unmount_event_flags);
}
XFS_SEND_UNMOUNT(mp);

xfs_unmountfs(mp);
xfs_freesb(mp);
Expand Down
23 changes: 19 additions & 4 deletions trunk/fs/xfs/xfs_mount.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,9 @@ typedef struct xfs_dmops {
xfs_send_unmount_t xfs_send_unmount;
} xfs_dmops_t;

#define XFS_DMAPI_UNMOUNT_FLAGS(mp) \
(((mp)->m_dmevmask & (1 << DM_EVENT_UNMOUNT)) ? 0 : DM_FLAGS_UNWANTED)

#define XFS_SEND_DATA(mp, ev,ip,off,len,fl,lock) \
(*(mp)->m_dm_ops->xfs_send_data)(ev,ip,off,len,fl,lock)
#define XFS_SEND_MMAP(mp, vma,fl) \
Expand All @@ -101,12 +104,24 @@ typedef struct xfs_dmops {
(*(mp)->m_dm_ops->xfs_send_destroy)(ip,right)
#define XFS_SEND_NAMESP(mp, ev,b1,r1,b2,r2,n1,n2,mode,rval,fl) \
(*(mp)->m_dm_ops->xfs_send_namesp)(ev,NULL,b1,r1,b2,r2,n1,n2,mode,rval,fl)
#define XFS_SEND_PREUNMOUNT(mp,b1,r1,b2,r2,n1,n2,mode,rval,fl) \
(*(mp)->m_dm_ops->xfs_send_namesp)(DM_EVENT_PREUNMOUNT,mp,b1,r1,b2,r2,n1,n2,mode,rval,fl)
#define XFS_SEND_MOUNT(mp,right,path,name) \
(*(mp)->m_dm_ops->xfs_send_mount)(mp,right,path,name)
#define XFS_SEND_UNMOUNT(mp, ip,right,mode,rval,fl) \
(*(mp)->m_dm_ops->xfs_send_unmount)(mp,ip,right,mode,rval,fl)
#define XFS_SEND_PREUNMOUNT(mp) \
do { \
if (mp->m_flags & XFS_MOUNT_DMAPI) { \
(*(mp)->m_dm_ops->xfs_send_namesp)(DM_EVENT_PREUNMOUNT, mp, \
(mp)->m_rootip, DM_RIGHT_NULL, \
(mp)->m_rootip, DM_RIGHT_NULL, \
NULL, NULL, 0, 0, XFS_DMAPI_UNMOUNT_FLAGS(mp)); \
} \
} while (0)
#define XFS_SEND_UNMOUNT(mp) \
do { \
if (mp->m_flags & XFS_MOUNT_DMAPI) { \
(*(mp)->m_dm_ops->xfs_send_unmount)(mp, (mp)->m_rootip, \
DM_RIGHT_NULL, 0, 0, XFS_DMAPI_UNMOUNT_FLAGS(mp)); \
} \
} while (0)


#ifdef HAVE_PERCPU_SB
Expand Down

0 comments on commit 7c51009

Please sign in to comment.