Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xfs: clean up printing inode32/64 in xfs_showargs

inode64 is the only value remaining in the unset array. Special case
the inode32/64 options with an explicit seq_printf that prints either
inode32 or inode64, and remove the unset array.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

authored by

Christoph Hellwig and committed by
Darrick J. Wong
1775c506 aa58d445

+3 -10
+3 -10
fs/xfs/xfs_super.c
··· 423 423 { XFS_MOUNT_FILESTREAMS, ",filestreams" }, 424 424 { XFS_MOUNT_GRPID, ",grpid" }, 425 425 { XFS_MOUNT_DISCARD, ",discard" }, 426 - { XFS_MOUNT_SMALL_INUMS, ",inode32" }, 427 426 { XFS_MOUNT_LARGEIO, ",largeio" }, 428 427 { XFS_MOUNT_DAX, ",dax" }, 429 - { 0, NULL } 430 - }; 431 - static struct proc_xfs_info xfs_info_unset[] = { 432 - /* the few simple ones we can get from the mount struct */ 433 - { XFS_MOUNT_SMALL_INUMS, ",inode64" }, 434 428 { 0, NULL } 435 429 }; 436 430 struct proc_xfs_info *xfs_infop; ··· 433 439 if (mp->m_flags & xfs_infop->flag) 434 440 seq_puts(m, xfs_infop->str); 435 441 } 436 - for (xfs_infop = xfs_info_unset; xfs_infop->flag; xfs_infop++) { 437 - if (!(mp->m_flags & xfs_infop->flag)) 438 - seq_puts(m, xfs_infop->str); 439 - } 442 + 443 + seq_printf(m, ",inode%d", 444 + (mp->m_flags & XFS_MOUNT_SMALL_INUMS) ? 32 : 64); 440 445 441 446 if (mp->m_flags & XFS_MOUNT_ALLOCSIZE) 442 447 seq_printf(m, ",allocsize=%dk",