/* cancel dfops associated with a transaction */
void xfs_defer_cancel(struct xfs_trans *);
-struct xfs_buf *libxfs_trans_getsb(struct xfs_trans *, struct xfs_mount *, int);
+struct xfs_buf *libxfs_trans_getsb(struct xfs_trans *, struct xfs_mount *);
void libxfs_trans_ijoin(struct xfs_trans *, struct xfs_inode *, uint);
void libxfs_trans_log_inode (struct xfs_trans *, struct xfs_inode *,
extern void libxfs_readbuf_verify(struct xfs_buf *bp,
const struct xfs_buf_ops *ops);
-extern xfs_buf_t *libxfs_getsb(struct xfs_mount *, int);
+extern xfs_buf_t *libxfs_getsb(struct xfs_mount *);
extern void libxfs_bcache_purge(void);
extern void libxfs_bcache_free(void);
extern void libxfs_bcache_flush(void);
xfs_buf_t *
-libxfs_getsb(xfs_mount_t *mp, int flags)
+libxfs_getsb(xfs_mount_t *mp)
{
return libxfs_readbuf(mp->m_ddev_targp, XFS_SB_DADDR,
- XFS_FSS_TO_BB(mp, 1), flags, &xfs_sb_buf_ops);
+ XFS_FSS_TO_BB(mp, 1), 0, &xfs_sb_buf_ops);
}
kmem_zone_t *xfs_buf_zone;
xfs_buf_t *
libxfs_trans_getsb(
xfs_trans_t *tp,
- struct xfs_mount *mp,
- int flags)
+ struct xfs_mount *mp)
{
xfs_buf_t *bp;
struct xfs_buf_log_item *bip;
DEFINE_SINGLE_BUF_MAP(map, XFS_SB_DADDR, len);
if (tp == NULL)
- return libxfs_getsb(mp, flags);
+ return libxfs_getsb(mp);
bp = xfs_trans_buf_item_match(tp, mp->m_dev, &map, 1);
if (bp != NULL) {
return bp;
}
- bp = libxfs_getsb(mp, flags);
+ bp = libxfs_getsb(mp);
if (bp == NULL)
return NULL;
struct xfs_trans *tp)
{
struct xfs_mount *mp = tp->t_mountp;
- struct xfs_buf *bp = xfs_trans_getsb(tp, mp, 0);
+ struct xfs_buf *bp = xfs_trans_getsb(tp, mp);
mp->m_sb.sb_icount = percpu_counter_sum(&mp->m_icount);
mp->m_sb.sb_ifree = percpu_counter_sum(&mp->m_ifree);
if (error)
return error;
- bp = xfs_trans_getsb(tp, mp, 0);
+ bp = xfs_trans_getsb(tp, mp);
xfs_log_sb(tp);
xfs_trans_bhold(tp, bp);
xfs_trans_set_sync(tp);
/*
* Mark the filesystem ok.
*/
- buf = libxfs_getsb(mp, LIBXFS_EXIT_ON_FAILURE);
+ buf = libxfs_getsb(mp);
+ if (!buf || buf->b_error)
+ exit(1);
(XFS_BUF_TO_SBP(buf))->sb_inprogress = 0;
libxfs_writebuf(buf, LIBXFS_EXIT_ON_FAILURE);
{
xfs_buf_t *bp;
- bp = libxfs_getsb(mp, 0);
+ bp = libxfs_getsb(mp);
if (!bp)
do_error(_("couldn't get superblock\n"));
/*
* Clear the quota flags if they're on.
*/
- sbp = libxfs_getsb(mp, 0);
+ sbp = libxfs_getsb(mp);
if (!sbp)
do_error(_("couldn't get superblock\n"));