diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2016-02-29 16:03:07 +1100 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2016-02-29 16:03:07 +1100 |
commit | 71893d81b6079a3b73a1b2dece4ac3d36ba2a0bc (patch) | |
tree | ab0d11dc62e1a9a3efd5e978c90e436c92fa54b7 | |
parent | ff0f39eadb85f3eb0110184bf6d64e43a2ed7f3d (diff) | |
download | xfsprogs-dev-libxfs-4.6-sync.tar.gz |
mkfs: fix crash when initializing rbmiplibxfs-4.6-sync
Initialize rbmip, log the inode, /then/ assign it to the xfs_mount.
Don't try to access rbmip in the xfs_mount before that, or it'll crash.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
-rw-r--r-- | mkfs/proto.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mkfs/proto.c b/mkfs/proto.c index 933924ef21..d99e965896 100644 --- a/mkfs/proto.c +++ b/mkfs/proto.c @@ -653,7 +653,7 @@ rtinit( mp->m_sb.sb_rbmino = rbmip->i_ino; rbmip->i_d.di_size = mp->m_sb.sb_rbmblocks * mp->m_sb.sb_blocksize; rbmip->i_d.di_flags = XFS_DIFLAG_NEWRTBM; - *(__uint64_t *)&VFS_I(mp->m_rbmip)->i_atime = 0; + *(__uint64_t *)&VFS_I(rbmip)->i_atime = 0; libxfs_trans_log_inode(tp, rbmip, XFS_ILOG_CORE); libxfs_log_sb(tp); mp->m_rbmip = rbmip; |