mirror of
https://github.com/versity/scoutfs.git
synced 2026-02-07 11:10:44 +00:00
scoutfs: don't try to sync on mount errors
kill_sb tries to sync before calling kill_block_super. It shouldn't do this on mount errors that wouldn't have initialized the higher level systems needed for syncing. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -1951,6 +1951,7 @@ int scoutfs_net_setup(struct super_block *sb)
|
||||
*/
|
||||
void scoutfs_net_destroy(struct super_block *sb)
|
||||
{
|
||||
struct scoutfs_sb_info *sbi = SCOUTFS_SB(sb);
|
||||
DECLARE_NET_INFO(sb, nti);
|
||||
struct sock_info *sinf;
|
||||
struct sock_info *pos;
|
||||
@@ -1987,5 +1988,6 @@ void scoutfs_net_destroy(struct super_block *sb)
|
||||
/* and free all resources */
|
||||
free_sbuf_list(sb, &nti->to_send, -ESHUTDOWN);
|
||||
free_nti(nti);
|
||||
sbi->net_info = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -259,8 +259,12 @@ static void scoutfs_kill_sb(struct super_block *sb)
|
||||
{
|
||||
struct scoutfs_sb_info *sbi = SCOUTFS_SB(sb);
|
||||
|
||||
/* make sure all dirty work is settled before killing the super */
|
||||
if (sbi) {
|
||||
/*
|
||||
* If we had successfully mounted then make sure dirty data
|
||||
* writeback and compaction is done before we kill the block
|
||||
* super and start tearing everything down.
|
||||
*/
|
||||
if (sb->s_root) {
|
||||
sync_filesystem(sb);
|
||||
|
||||
scoutfs_lock_shutdown(sb);
|
||||
@@ -271,6 +275,7 @@ static void scoutfs_kill_sb(struct super_block *sb)
|
||||
|
||||
if (sbi) {
|
||||
scoutfs_lock_destroy(sb);
|
||||
scoutfs_net_destroy(sb);
|
||||
scoutfs_shutdown_trans(sb);
|
||||
scoutfs_data_destroy(sb);
|
||||
scoutfs_inode_destroy(sb);
|
||||
|
||||
Reference in New Issue
Block a user