remove superflous xfs_readsb call in xfs_mountfs
PATCH 1/1 remove superflous xfs_readsb call in xfs_mountfs
When xfs_mountfs is called by xfs_mount xfs_readsb was called 35 lines above unconditionally, so there is no need to try to read the superblock if it's not present. If any other port doesn't have the superblock read at this point it should just call it directly from it's xfs_mount equivalent.
fs/xfs/xfs_mount.c +0 -5
@@ -968,11 +968,6 @@ xfs_mountfs(int uuid_mounted =0 ;int error =0 ; -if (mp->m_sb_bp ==NULL ) { - error =xfs_readsb (mp, mfsi_flags); -if (error) -return error; - }xfs_mount_common (mp, sbp);/*
Quoted 5 lines · Christoph Hellwig
When
xfs_mountfsis called byxfs_mountxfs_readsbwas called 35 lines above unconditionally, so there is no need to try to read the superblock if it's not present. If any other port doesn't have the superblock read at this point it should just call it directly from it'sxfs_mountequivalent.
Ping?
Quoted 10 lines
Signed-off-by Christoph Hellwig <[email protected]>Index:
linux-2.6-xfs/fs/xfs/xfs_mount.c
===================================================================fs/xfs/xfs_mount.c +0
-0@@ -968,11 +968,6 @@ xfs_mountfs(int uuid_mounted =0 ;
fs/xfs/xfs_mount.c xfs_mountfs( · line 973
Quoted 10 lines
fs/xfs/xfs_mount.c +0
-5int error =0 ; -if (mp->m_sb_bp ==NULL ) { - error =xfs_readsb (mp, mfsi_flags); -if (error) -return error; - }xfs_mount_common (mp, sbp);/*
---end quoted text---
Quoted 8 lines · Christoph Hellwig
Quoted 5 lines · Christoph Hellwig
When
xfs_mountfsis called byxfs_mountxfs_readsbwas called 35 lines above unconditionally, so there is no need to try to read the superblock if it's not present. If any other port doesn't have the superblock read at this point it should just call it directly from it'sxfs_mountequivalent.Ping?
Looks good, will be in shortly.
Don
Quoted 22 lines
Quoted 10 lines
Signed-off-by Christoph Hellwig <[email protected]>Index:
linux-2.6-xfs/fs/xfs/xfs_mount.c
===================================================================fs/xfs/xfs_mount.c +0
-0@@ -968,11 +968,6 @@ xfs_mountfs(int uuid_mounted =0 ;fs/xfs/xfs_mount.c xfs_mountfs( · line 973
Quoted 10 lines
fs/xfs/xfs_mount.c +0
-5int error =0 ; -if (mp->m_sb_bp ==NULL ) { - error =xfs_readsb (mp, mfsi_flags); -if (error) -return error; - }xfs_mount_common (mp, sbp);/* ---end quoted text---