mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 02:30:34 +02:00 
			
		
		
		
	ocfs2: stop using bdev->bd_super for journal error logging
All ocfs2 journal error handling and logging is based on buffer_heads, and the owning inode and thus super_block can be retrieved through bh->b_assoc_map->host. Switch to using that to remove the last users of bdev->bd_super. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Joseph Qi <joseph.qi@linux.alibaba.com> Message-Id: <20230807112625.652089-4-hch@lst.de> Signed-off-by: Christian Brauner <brauner@kernel.org>
This commit is contained in:
		
							parent
							
								
									01efe93a5a
								
							
						
					
					
						commit
						8887b94d93
					
				
					 1 changed files with 3 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -557,7 +557,7 @@ static void ocfs2_abort_trigger(struct jbd2_buffer_trigger_type *triggers,
 | 
			
		|||
	     (unsigned long)bh,
 | 
			
		||||
	     (unsigned long long)bh->b_blocknr);
 | 
			
		||||
 | 
			
		||||
	ocfs2_error(bh->b_bdev->bd_super,
 | 
			
		||||
	ocfs2_error(bh->b_assoc_map->host->i_sb,
 | 
			
		||||
		    "JBD2 has aborted our journal, ocfs2 cannot continue\n");
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -780,14 +780,14 @@ void ocfs2_journal_dirty(handle_t *handle, struct buffer_head *bh)
 | 
			
		|||
		mlog_errno(status);
 | 
			
		||||
		if (!is_handle_aborted(handle)) {
 | 
			
		||||
			journal_t *journal = handle->h_transaction->t_journal;
 | 
			
		||||
			struct super_block *sb = bh->b_bdev->bd_super;
 | 
			
		||||
 | 
			
		||||
			mlog(ML_ERROR, "jbd2_journal_dirty_metadata failed. "
 | 
			
		||||
					"Aborting transaction and journal.\n");
 | 
			
		||||
			handle->h_err = status;
 | 
			
		||||
			jbd2_journal_abort_handle(handle);
 | 
			
		||||
			jbd2_journal_abort(journal, status);
 | 
			
		||||
			ocfs2_abort(sb, "Journal already aborted.\n");
 | 
			
		||||
			ocfs2_abort(bh->b_assoc_map->host->i_sb,
 | 
			
		||||
				    "Journal already aborted.\n");
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue