]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs: clean up xfs_mount allocation and dynamic initializers
authorBrian Foster <bfoster@redhat.com>
Wed, 18 Apr 2018 19:46:07 +0000 (14:46 -0500)
committerEric Sandeen <sandeen@redhat.com>
Wed, 18 Apr 2018 19:46:07 +0000 (14:46 -0500)
commit19fbb9ddcd01790d49dbe1cbd5fdd817c457a6c3
tree8c745f8e52fa340006a1577836e9a90941dc9a22
parentd206fcb7494374ef680f7ed91a1cfc54bcc99d5e
xfs: clean up xfs_mount allocation and dynamic initializers

Source kernel commit: 72c44e35f02a1cb4032e476c398a7234badcf49f

Most of the generic data structures embedded in xfs_mount are
dynamically initialized immediately after mp is allocated. A few
fields are left out and initialized during the xfs_mountfs()
sequence, after mp has been attached to the superblock.

To clean this up and help prevent premature access of associated
fields, refactor xfs_mount allocation and all dependent init calls
into a new helper. This self-documents that all low level data
structures (i.e., locks, trees, etc.) should be initialized before
xfs_mount is attached to the superblock.

Signed-off-by: Brian Foster <bfoster@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
libxfs/xfs_sb.c