/* The only special thing we need to do here is to make sure that all jbd2_journal_stop calls result in the superblock being marked dirty, so that sync() will call the filesystem's write_super callback if appropriate.  */
int __ext4_journal_stop(const char *where, handle_t *handle)
/* The only special thing we need to do here is to make sure that all jbd2_journal_stop calls result in the superblock being marked dirty, so that sync() will call the filesystem's write_super callback if appropriate.  */
int __ext4_journal_stop(const char *where, handle_t *handle)
{
	struct super_block *sb;
	int err;
	int rc;
	if (!ext4_handle_valid(handle)) {
		ext4_put_nojournal(handle);
		return 0;
	}
	sb = handle->h_transaction->t_journal->j_private;
	err = handle->h_err;
	rc = jbd2_journal_stop(handle);
	if (!err)
		err = rc;
	if (err)
		__ext4_std_error(sb, where, err);
	return err;
}