Commit a304c38b authored by Stephen Lord's avatar Stephen Lord

[XFS] Remove a dead code path from mount, noticed by Al Viro.

SGI Modid: 2.5.x-xfs:slinx:151226a
parent 1611e861
...@@ -77,8 +77,7 @@ xfs_ioinit( ...@@ -77,8 +77,7 @@ xfs_ioinit(
struct xfs_mount_args *mntargs, struct xfs_mount_args *mntargs,
int flags) int flags)
{ {
return xfs_mountfs(vfsp, XFS_VFSTOM(vfsp), return xfs_mountfs(vfsp, XFS_VFSTOM(vfsp), flags);
vfsp->vfs_super->s_bdev->bd_dev, flags);
} }
xfs_ioops_t xfs_iocore_xfs = { xfs_ioops_t xfs_iocore_xfs = {
......
...@@ -620,7 +620,6 @@ int ...@@ -620,7 +620,6 @@ int
xfs_mountfs( xfs_mountfs(
vfs_t *vfsp, vfs_t *vfsp,
xfs_mount_t *mp, xfs_mount_t *mp,
dev_t dev,
int mfsi_flags) int mfsi_flags)
{ {
xfs_buf_t *bp; xfs_buf_t *bp;
...@@ -633,11 +632,10 @@ xfs_mountfs( ...@@ -633,11 +632,10 @@ xfs_mountfs(
__uint64_t ret64; __uint64_t ret64;
__int64_t update_flags; __int64_t update_flags;
uint quotamount, quotaflags; uint quotamount, quotaflags;
int agno, noio; int agno;
int uuid_mounted = 0; int uuid_mounted = 0;
int error = 0; int error = 0;
noio = dev == 0 && mp->m_sb_bp != NULL;
if (mp->m_sb_bp == NULL) { if (mp->m_sb_bp == NULL) {
if ((error = xfs_readsb(mp))) { if ((error = xfs_readsb(mp))) {
return (error); return (error);
...@@ -826,22 +824,20 @@ xfs_mountfs( ...@@ -826,22 +824,20 @@ xfs_mountfs(
error = XFS_ERROR(E2BIG); error = XFS_ERROR(E2BIG);
goto error1; goto error1;
} }
if (!noio) { error = xfs_read_buf(mp, mp->m_ddev_targp,
error = xfs_read_buf(mp, mp->m_ddev_targp, d - XFS_FSS_TO_BB(mp, 1),
d - XFS_FSS_TO_BB(mp, 1), XFS_FSS_TO_BB(mp, 1), 0, &bp);
XFS_FSS_TO_BB(mp, 1), 0, &bp); if (!error) {
if (!error) { xfs_buf_relse(bp);
xfs_buf_relse(bp); } else {
} else { cmn_err(CE_WARN, "XFS: size check 2 failed");
cmn_err(CE_WARN, "XFS: size check 2 failed"); if (error == ENOSPC) {
if (error == ENOSPC) { error = XFS_ERROR(E2BIG);
error = XFS_ERROR(E2BIG);
}
goto error1;
} }
goto error1;
} }
if (!noio && ((mfsi_flags & XFS_MFSI_CLIENT) == 0) && if (((mfsi_flags & XFS_MFSI_CLIENT) == 0) &&
mp->m_logdev_targp != mp->m_ddev_targp) { mp->m_logdev_targp != mp->m_ddev_targp) {
d = (xfs_daddr_t)XFS_FSB_TO_BB(mp, mp->m_sb.sb_logblocks); d = (xfs_daddr_t)XFS_FSB_TO_BB(mp, mp->m_sb.sb_logblocks);
if (XFS_BB_TO_FSB(mp, d) != mp->m_sb.sb_logblocks) { if (XFS_BB_TO_FSB(mp, d) != mp->m_sb.sb_logblocks) {
...@@ -918,10 +914,6 @@ xfs_mountfs( ...@@ -918,10 +914,6 @@ xfs_mountfs(
* Initialize the precomputed transaction reservations values. * Initialize the precomputed transaction reservations values.
*/ */
xfs_trans_init(mp); xfs_trans_init(mp);
if (noio) {
ASSERT((mfsi_flags & XFS_MFSI_CLIENT) == 0);
return 0;
}
/* /*
* Allocate and initialize the inode hash table for this * Allocate and initialize the inode hash table for this
......
...@@ -539,7 +539,7 @@ typedef struct xfs_mod_sb { ...@@ -539,7 +539,7 @@ typedef struct xfs_mod_sb {
extern xfs_mount_t *xfs_mount_init(void); extern xfs_mount_t *xfs_mount_init(void);
extern void xfs_mod_sb(xfs_trans_t *, __int64_t); extern void xfs_mod_sb(xfs_trans_t *, __int64_t);
extern void xfs_mount_free(xfs_mount_t *mp, int remove_bhv); extern void xfs_mount_free(xfs_mount_t *mp, int remove_bhv);
extern int xfs_mountfs(struct vfs *, xfs_mount_t *mp, dev_t, int); extern int xfs_mountfs(struct vfs *, xfs_mount_t *mp, int);
extern int xfs_unmountfs(xfs_mount_t *, struct cred *); extern int xfs_unmountfs(xfs_mount_t *, struct cred *);
extern void xfs_unmountfs_close(xfs_mount_t *, struct cred *); extern void xfs_unmountfs_close(xfs_mount_t *, struct cred *);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment