* [PATCH] mkfs: fix crash when initializing rbmip
@ 2016-02-26 19:34 Darrick J. Wong
2016-02-26 19:42 ` Christoph Hellwig
0 siblings, 1 reply; 2+ messages in thread
From: Darrick J. Wong @ 2016-02-26 19:34 UTC (permalink / raw)
To: Brian Foster; +Cc: xfs
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>
---
mkfs/proto.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/mkfs/proto.c b/mkfs/proto.c
index 933924e..d99e965 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;
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] mkfs: fix crash when initializing rbmip
2016-02-26 19:34 [PATCH] mkfs: fix crash when initializing rbmip Darrick J. Wong
@ 2016-02-26 19:42 ` Christoph Hellwig
0 siblings, 0 replies; 2+ messages in thread
From: Christoph Hellwig @ 2016-02-26 19:42 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: Brian Foster, xfs
Oops, should have cought that when reviewing.
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-02-26 19:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-26 19:34 [PATCH] mkfs: fix crash when initializing rbmip Darrick J. Wong
2016-02-26 19:42 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox