Skip to content

Commit

Permalink
kill xfs_unmount_flush
Browse files Browse the repository at this point in the history
There's almost nothing left in this function, instead remove the IRELE
on the real times inodes and the call to XFS_QM_UNMOUNT into xfs_unmountfs.

For the regular unmount case that means it now also happenes after dmapi
notification, but otherwise there is no difference in behaviour.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Niv Sardi <xaiki@sgi.com>
  • Loading branch information
Christoph Hellwig authored and Niv Sardi committed Dec 4, 2008
1 parent e57481d commit f95099b
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 90 deletions.
1 change: 0 additions & 1 deletion fs/xfs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ xfs-y += xfs_alloc.o \
xfs_trans_inode.o \
xfs_trans_item.o \
xfs_utils.o \
xfs_vfsops.o \
xfs_vnodeops.o \
xfs_rw.o \
xfs_dmops.o \
Expand Down
5 changes: 0 additions & 5 deletions fs/xfs/linux-2.6/xfs_super.c
Original file line number Diff line number Diff line change
Expand Up @@ -1043,7 +1043,6 @@ xfs_fs_put_super(
struct xfs_mount *mp = XFS_M(sb);
struct xfs_inode *rip = mp->m_rootip;
int unmount_event_flags = 0;
int error;

xfs_syncd_stop(mp);
xfs_sync_inodes(mp, SYNC_ATTR|SYNC_DELWRI);
Expand Down Expand Up @@ -1071,8 +1070,6 @@ xfs_fs_put_super(
xfs_filestream_unmount(mp);

XFS_bflush(mp->m_ddev_targp);
error = xfs_unmount_flush(mp, 0);
WARN_ON(error);

if (mp->m_flags & XFS_MOUNT_DMAPI) {
XFS_SEND_UNMOUNT(mp, rip, DM_RIGHT_NULL, 0, 0,
Expand Down Expand Up @@ -1535,8 +1532,6 @@ xfs_fs_fill_super(
xfs_filestream_unmount(mp);

XFS_bflush(mp->m_ddev_targp);
error = xfs_unmount_flush(mp, 0);
WARN_ON(error);

xfs_unmountfs(mp);
goto out_free_sb;
Expand Down
10 changes: 10 additions & 0 deletions fs/xfs/xfs_mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -1220,6 +1220,16 @@ xfs_unmountfs(
__uint64_t resblks;
int error;

/*
* Release dquot that rootinode, rbmino and rsumino might be holding,
* and release the quota inodes.
*/
XFS_QM_UNMOUNT(mp);

if (mp->m_rbmip)
IRELE(mp->m_rbmip);
if (mp->m_rsumip)
IRELE(mp->m_rsumip);
IRELE(mp->m_rootip);

/*
Expand Down
1 change: 0 additions & 1 deletion fs/xfs/xfs_mount.h
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,6 @@ extern void xfs_mountfs_check_barriers(xfs_mount_t *mp);

extern void xfs_unmountfs(xfs_mount_t *);
extern int xfs_unmountfs_writesb(xfs_mount_t *);
extern int xfs_unmount_flush(xfs_mount_t *, int);
extern int xfs_mod_incore_sb(xfs_mount_t *, xfs_sb_field_t, int64_t, int);
extern int xfs_mod_incore_sb_unlocked(xfs_mount_t *, xfs_sb_field_t,
int64_t, int);
Expand Down
83 changes: 0 additions & 83 deletions fs/xfs/xfs_vfsops.c

This file was deleted.

0 comments on commit f95099b

Please sign in to comment.