All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] ext4: fold ext4_sync_fs_nojournal() into ext4_sync_fs()
@ 2014-09-18 20:26 Theodore Ts'o
  2014-09-18 20:26 ` [PATCH 2/3] ext4: support freezing ext2 (nojournal) file systems Theodore Ts'o
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Theodore Ts'o @ 2014-09-18 20:26 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Dexuan Cui, Theodore Ts'o

This allows us to eliminate duplicate code, and eventually allow us to
also fold ext4_sops and ext4_nojournal_sops together.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 fs/ext4/super.c | 36 +++++++++++++-----------------------
 1 file changed, 13 insertions(+), 23 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 115e27d..4770c98 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -70,7 +70,6 @@ static void ext4_mark_recovery_complete(struct super_block *sb,
 static void ext4_clear_journal_err(struct super_block *sb,
 				   struct ext4_super_block *es);
 static int ext4_sync_fs(struct super_block *sb, int wait);
-static int ext4_sync_fs_nojournal(struct super_block *sb, int wait);
 static int ext4_remount(struct super_block *sb, int *flags, char *data);
 static int ext4_statfs(struct dentry *dentry, struct kstatfs *buf);
 static int ext4_unfreeze(struct super_block *sb);
@@ -1131,7 +1130,7 @@ static const struct super_operations ext4_nojournal_sops = {
 	.dirty_inode	= ext4_dirty_inode,
 	.drop_inode	= ext4_drop_inode,
 	.evict_inode	= ext4_evict_inode,
-	.sync_fs	= ext4_sync_fs_nojournal,
+	.sync_fs	= ext4_sync_fs,
 	.put_super	= ext4_put_super,
 	.statfs		= ext4_statfs,
 	.remount_fs	= ext4_remount,
@@ -4718,15 +4717,19 @@ static int ext4_sync_fs(struct super_block *sb, int wait)
 	 * being sent at the end of the function. But we can skip it if
 	 * transaction_commit will do it for us.
 	 */
-	target = jbd2_get_latest_transaction(sbi->s_journal);
-	if (wait && sbi->s_journal->j_flags & JBD2_BARRIER &&
-	    !jbd2_trans_will_send_data_barrier(sbi->s_journal, target))
+	if (sbi->s_journal) {
+		target = jbd2_get_latest_transaction(sbi->s_journal);
+		if (wait && sbi->s_journal->j_flags & JBD2_BARRIER &&
+		    !jbd2_trans_will_send_data_barrier(sbi->s_journal, target))
+			needs_barrier = true;
+
+		if (jbd2_journal_start_commit(sbi->s_journal, &target)) {
+			if (wait)
+				ret = jbd2_log_wait_commit(sbi->s_journal,
+							   target);
+		}
+	} else if (wait && test_opt(sb, BARRIER))
 		needs_barrier = true;
-
-	if (jbd2_journal_start_commit(sbi->s_journal, &target)) {
-		if (wait)
-			ret = jbd2_log_wait_commit(sbi->s_journal, target);
-	}
 	if (needs_barrier) {
 		int err;
 		err = blkdev_issue_flush(sb->s_bdev, GFP_KERNEL, NULL);
@@ -4737,19 +4740,6 @@ static int ext4_sync_fs(struct super_block *sb, int wait)
 	return ret;
 }
 
-static int ext4_sync_fs_nojournal(struct super_block *sb, int wait)
-{
-	int ret = 0;
-
-	trace_ext4_sync_fs(sb, wait);
-	flush_workqueue(EXT4_SB(sb)->rsv_conversion_wq);
-	dquot_writeback_dquots(sb, -1);
-	if (wait && test_opt(sb, BARRIER))
-		ret = blkdev_issue_flush(sb->s_bdev, GFP_KERNEL, NULL);
-
-	return ret;
-}

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 2/3] ext4: support freezing ext2 (nojournal) file systems
  2014-09-18 20:26 [PATCH 1/3] ext4: fold ext4_sync_fs_nojournal() into ext4_sync_fs() Theodore Ts'o
@ 2014-09-18 20:26 ` Theodore Ts'o
  2014-09-18 20:46   ` Andreas Dilger
  2014-09-23 12:33   ` Jan Kara
  2014-09-18 20:26 ` [PATCH 3/3] ext4: fold ext4_nojournal_sops into ext4_sops Theodore Ts'o
  2014-09-23 12:29 ` [PATCH 1/3] ext4: fold ext4_sync_fs_nojournal() into ext4_sync_fs() Jan Kara
  2 siblings, 2 replies; 8+ messages in thread
From: Theodore Ts'o @ 2014-09-18 20:26 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Dexuan Cui, Theodore Ts'o

Through an oversight, when we added nojournal support to ext4, we
didn't add support to allow file system freezing.  This is relatively
easy to add, so let's do it.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Reported-by: Dexuan Cui <decui@microsoft.com>
---
 fs/ext4/super.c | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 4770c98..921d5b4 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1131,6 +1131,8 @@ static const struct super_operations ext4_nojournal_sops = {
 	.drop_inode	= ext4_drop_inode,
 	.evict_inode	= ext4_evict_inode,
 	.sync_fs	= ext4_sync_fs,
+	.freeze_fs	= ext4_freeze,
+	.unfreeze_fs	= ext4_unfreeze,
 	.put_super	= ext4_put_super,
 	.statfs		= ext4_statfs,
 	.remount_fs	= ext4_remount,
@@ -4758,23 +4760,26 @@ static int ext4_freeze(struct super_block *sb)
 
 	journal = EXT4_SB(sb)->s_journal;
 
-	/* Now we set up the journal barrier. */
-	jbd2_journal_lock_updates(journal);
+	if (journal) {
+		/* Now we set up the journal barrier. */
+		jbd2_journal_lock_updates(journal);
 
-	/*
-	 * Don't clear the needs_recovery flag if we failed to flush
-	 * the journal.
-	 */
-	error = jbd2_journal_flush(journal);
-	if (error < 0)
-		goto out;
+		/*
+		 * Don't clear the needs_recovery flag if we failed to
+		 * flush the journal.
+		 */
+		error = jbd2_journal_flush(journal);
+		if (error < 0)
+			goto out;
+	}
 
 	/* Journal blocked and flushed, clear needs_recovery flag. */
 	EXT4_CLEAR_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER);
 	error = ext4_commit_super(sb, 1);
 out:
-	/* we rely on upper layer to stop further updates */
-	jbd2_journal_unlock_updates(EXT4_SB(sb)->s_journal);
+	if (journal)
+		/* we rely on upper layer to stop further updates */
+		jbd2_journal_unlock_updates(EXT4_SB(sb)->s_journal);
 	return error;
 }
 
-- 
2.1.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH 3/3] ext4: fold ext4_nojournal_sops into ext4_sops
  2014-09-18 20:26 [PATCH 1/3] ext4: fold ext4_sync_fs_nojournal() into ext4_sync_fs() Theodore Ts'o
  2014-09-18 20:26 ` [PATCH 2/3] ext4: support freezing ext2 (nojournal) file systems Theodore Ts'o
@ 2014-09-18 20:26 ` Theodore Ts'o
  2014-09-23 12:31   ` Jan Kara
  2014-09-23 12:29 ` [PATCH 1/3] ext4: fold ext4_sync_fs_nojournal() into ext4_sync_fs() Jan Kara
  2 siblings, 1 reply; 8+ messages in thread
From: Theodore Ts'o @ 2014-09-18 20:26 UTC (permalink / raw)
  To: Ext4 Developers List; +Cc: Dexuan Cui, Theodore Ts'o

There's no longer any need to have a separate set of super_operations
for nojournal mode.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
 fs/ext4/super.c | 27 +--------------------------
 1 file changed, 1 insertion(+), 26 deletions(-)

diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 921d5b4..e747b97 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -1123,27 +1123,6 @@ static const struct super_operations ext4_sops = {
 	.bdev_try_to_free_page = bdev_try_to_free_page,
 };
 
-static const struct super_operations ext4_nojournal_sops = {
-	.alloc_inode	= ext4_alloc_inode,
-	.destroy_inode	= ext4_destroy_inode,
-	.write_inode	= ext4_write_inode,
-	.dirty_inode	= ext4_dirty_inode,
-	.drop_inode	= ext4_drop_inode,
-	.evict_inode	= ext4_evict_inode,
-	.sync_fs	= ext4_sync_fs,
-	.freeze_fs	= ext4_freeze,
-	.unfreeze_fs	= ext4_unfreeze,
-	.put_super	= ext4_put_super,
-	.statfs		= ext4_statfs,
-	.remount_fs	= ext4_remount,
-	.show_options	= ext4_show_options,
-#ifdef CONFIG_QUOTA
-	.quota_read	= ext4_quota_read,
-	.quota_write	= ext4_quota_write,
-#endif
-	.bdev_try_to_free_page = bdev_try_to_free_page,
-};

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] ext4: support freezing ext2 (nojournal) file systems
  2014-09-18 20:26 ` [PATCH 2/3] ext4: support freezing ext2 (nojournal) file systems Theodore Ts'o
@ 2014-09-18 20:46   ` Andreas Dilger
  2014-09-18 21:13     ` Theodore Ts'o
  2014-09-23 12:33   ` Jan Kara
  1 sibling, 1 reply; 8+ messages in thread
From: Andreas Dilger @ 2014-09-18 20:46 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: Ext4 Developers List, Dexuan Cui

[-- Attachment #1: Type: text/plain, Size: 1083 bytes --]

On Sep 18, 2014, at 2:26 PM, Theodore Ts'o <tytso@mit.edu> wrote:
> Through an oversight, when we added nojournal support to ext4, we
> didn't add support to allow file system freezing.  This is relatively
> easy to add, so let's do it.
> 
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> Reported-by: Dexuan Cui <decui@microsoft.com>
> ---
> fs/ext4/super.c | 27 ++++++++++++++++-----------
> 1 file changed, 16 insertions(+), 11 deletions(-)
> 
> @@ -4758,23 +4760,26 @@ static int ext4_freeze(struct super_block *sb)
> 
> 	journal = EXT4_SB(sb)->s_journal;
[snip]
> 	/* Journal blocked and flushed, clear needs_recovery flag. */
> 	EXT4_CLEAR_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER);
> 	error = ext4_commit_super(sb, 1);
> out:
> -	/* we rely on upper layer to stop further updates */
> -	jbd2_journal_unlock_updates(EXT4_SB(sb)->s_journal);
> +	if (journal)
> +		/* we rely on upper layer to stop further updates */
> +		jbd2_journal_unlock_updates(EXT4_SB(sb)->s_journal);

This could use "journal" directly instead of "EXT4_SB(sb)->s_journal"

Cheers, Andreas






[-- Attachment #2: Message signed with OpenPGP using GPGMail --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] ext4: support freezing ext2 (nojournal) file systems
  2014-09-18 20:46   ` Andreas Dilger
@ 2014-09-18 21:13     ` Theodore Ts'o
  0 siblings, 0 replies; 8+ messages in thread
From: Theodore Ts'o @ 2014-09-18 21:13 UTC (permalink / raw)
  To: Andreas Dilger; +Cc: Ext4 Developers List, Dexuan Cui

On Thu, Sep 18, 2014 at 02:46:34PM -0600, Andreas Dilger wrote:
> > +	if (journal)
> > +		/* we rely on upper layer to stop further updates */
> > +		jbd2_journal_unlock_updates(EXT4_SB(sb)->s_journal);
> 
> This could use "journal" directly instead of "EXT4_SB(sb)->s_journal"

Good point, done.

				- Ted

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 1/3] ext4: fold ext4_sync_fs_nojournal() into ext4_sync_fs()
  2014-09-18 20:26 [PATCH 1/3] ext4: fold ext4_sync_fs_nojournal() into ext4_sync_fs() Theodore Ts'o
  2014-09-18 20:26 ` [PATCH 2/3] ext4: support freezing ext2 (nojournal) file systems Theodore Ts'o
  2014-09-18 20:26 ` [PATCH 3/3] ext4: fold ext4_nojournal_sops into ext4_sops Theodore Ts'o
@ 2014-09-23 12:29 ` Jan Kara
  2 siblings, 0 replies; 8+ messages in thread
From: Jan Kara @ 2014-09-23 12:29 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: Ext4 Developers List, Dexuan Cui

On Thu 18-09-14 16:26:27, Ted Tso wrote:
> This allows us to eliminate duplicate code, and eventually allow us to
> also fold ext4_sops and ext4_nojournal_sops together.
> 
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
  Looks good. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/ext4/super.c | 36 +++++++++++++-----------------------
>  1 file changed, 13 insertions(+), 23 deletions(-)
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 115e27d..4770c98 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -70,7 +70,6 @@ static void ext4_mark_recovery_complete(struct super_block *sb,
>  static void ext4_clear_journal_err(struct super_block *sb,
>  				   struct ext4_super_block *es);
>  static int ext4_sync_fs(struct super_block *sb, int wait);
> -static int ext4_sync_fs_nojournal(struct super_block *sb, int wait);
>  static int ext4_remount(struct super_block *sb, int *flags, char *data);
>  static int ext4_statfs(struct dentry *dentry, struct kstatfs *buf);
>  static int ext4_unfreeze(struct super_block *sb);
> @@ -1131,7 +1130,7 @@ static const struct super_operations ext4_nojournal_sops = {
>  	.dirty_inode	= ext4_dirty_inode,
>  	.drop_inode	= ext4_drop_inode,
>  	.evict_inode	= ext4_evict_inode,
> -	.sync_fs	= ext4_sync_fs_nojournal,
> +	.sync_fs	= ext4_sync_fs,
>  	.put_super	= ext4_put_super,
>  	.statfs		= ext4_statfs,
>  	.remount_fs	= ext4_remount,
> @@ -4718,15 +4717,19 @@ static int ext4_sync_fs(struct super_block *sb, int wait)
>  	 * being sent at the end of the function. But we can skip it if
>  	 * transaction_commit will do it for us.
>  	 */
> -	target = jbd2_get_latest_transaction(sbi->s_journal);
> -	if (wait && sbi->s_journal->j_flags & JBD2_BARRIER &&
> -	    !jbd2_trans_will_send_data_barrier(sbi->s_journal, target))
> +	if (sbi->s_journal) {
> +		target = jbd2_get_latest_transaction(sbi->s_journal);
> +		if (wait && sbi->s_journal->j_flags & JBD2_BARRIER &&
> +		    !jbd2_trans_will_send_data_barrier(sbi->s_journal, target))
> +			needs_barrier = true;
> +
> +		if (jbd2_journal_start_commit(sbi->s_journal, &target)) {
> +			if (wait)
> +				ret = jbd2_log_wait_commit(sbi->s_journal,
> +							   target);
> +		}
> +	} else if (wait && test_opt(sb, BARRIER))
>  		needs_barrier = true;
> -
> -	if (jbd2_journal_start_commit(sbi->s_journal, &target)) {
> -		if (wait)
> -			ret = jbd2_log_wait_commit(sbi->s_journal, target);
> -	}
>  	if (needs_barrier) {
>  		int err;
>  		err = blkdev_issue_flush(sb->s_bdev, GFP_KERNEL, NULL);
> @@ -4737,19 +4740,6 @@ static int ext4_sync_fs(struct super_block *sb, int wait)
>  	return ret;
>  }
>  
> -static int ext4_sync_fs_nojournal(struct super_block *sb, int wait)
> -{
> -	int ret = 0;
> -
> -	trace_ext4_sync_fs(sb, wait);
> -	flush_workqueue(EXT4_SB(sb)->rsv_conversion_wq);
> -	dquot_writeback_dquots(sb, -1);
> -	if (wait && test_opt(sb, BARRIER))
> -		ret = blkdev_issue_flush(sb->s_bdev, GFP_KERNEL, NULL);
> -
> -	return ret;
> -}
> -
>  /*
>   * LVM calls this function before a (read-only) snapshot is created.  This
>   * gives us a chance to flush the journal completely and mark the fs clean.
> -- 
> 2.1.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 3/3] ext4: fold ext4_nojournal_sops into ext4_sops
  2014-09-18 20:26 ` [PATCH 3/3] ext4: fold ext4_nojournal_sops into ext4_sops Theodore Ts'o
@ 2014-09-23 12:31   ` Jan Kara
  0 siblings, 0 replies; 8+ messages in thread
From: Jan Kara @ 2014-09-23 12:31 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: Ext4 Developers List, Dexuan Cui

On Thu 18-09-14 16:26:29, Ted Tso wrote:
> There's no longer any need to have a separate set of super_operations
> for nojournal mode.
> 
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
  Nice :) You can add:
Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/ext4/super.c | 27 +--------------------------
>  1 file changed, 1 insertion(+), 26 deletions(-)
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 921d5b4..e747b97 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -1123,27 +1123,6 @@ static const struct super_operations ext4_sops = {
>  	.bdev_try_to_free_page = bdev_try_to_free_page,
>  };
>  
> -static const struct super_operations ext4_nojournal_sops = {
> -	.alloc_inode	= ext4_alloc_inode,
> -	.destroy_inode	= ext4_destroy_inode,
> -	.write_inode	= ext4_write_inode,
> -	.dirty_inode	= ext4_dirty_inode,
> -	.drop_inode	= ext4_drop_inode,
> -	.evict_inode	= ext4_evict_inode,
> -	.sync_fs	= ext4_sync_fs,
> -	.freeze_fs	= ext4_freeze,
> -	.unfreeze_fs	= ext4_unfreeze,
> -	.put_super	= ext4_put_super,
> -	.statfs		= ext4_statfs,
> -	.remount_fs	= ext4_remount,
> -	.show_options	= ext4_show_options,
> -#ifdef CONFIG_QUOTA
> -	.quota_read	= ext4_quota_read,
> -	.quota_write	= ext4_quota_write,
> -#endif
> -	.bdev_try_to_free_page = bdev_try_to_free_page,
> -};
> -
>  static const struct export_operations ext4_export_ops = {
>  	.fh_to_dentry = ext4_fh_to_dentry,
>  	.fh_to_parent = ext4_fh_to_parent,
> @@ -3941,11 +3920,7 @@ static int ext4_fill_super(struct super_block *sb, void *data, int silent)
>  	/*
>  	 * set up enough so that it can read an inode
>  	 */
> -	if (!test_opt(sb, NOLOAD) &&
> -	    EXT4_HAS_COMPAT_FEATURE(sb, EXT4_FEATURE_COMPAT_HAS_JOURNAL))
> -		sb->s_op = &ext4_sops;
> -	else
> -		sb->s_op = &ext4_nojournal_sops;
> +	sb->s_op = &ext4_sops;
>  	sb->s_export_op = &ext4_export_ops;
>  	sb->s_xattr = ext4_xattr_handlers;
>  #ifdef CONFIG_QUOTA
> -- 
> 2.1.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH 2/3] ext4: support freezing ext2 (nojournal) file systems
  2014-09-18 20:26 ` [PATCH 2/3] ext4: support freezing ext2 (nojournal) file systems Theodore Ts'o
  2014-09-18 20:46   ` Andreas Dilger
@ 2014-09-23 12:33   ` Jan Kara
  1 sibling, 0 replies; 8+ messages in thread
From: Jan Kara @ 2014-09-23 12:33 UTC (permalink / raw)
  To: Theodore Ts'o; +Cc: Ext4 Developers List, Dexuan Cui

On Thu 18-09-14 16:26:28, Ted Tso wrote:
> Through an oversight, when we added nojournal support to ext4, we
> didn't add support to allow file system freezing.  This is relatively
> easy to add, so let's do it.
> 
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
> Reported-by: Dexuan Cui <decui@microsoft.com>
  Looks good. You can add:
Reviewed-by: Jan Kara <jack@suse.cz>

								Honza

> ---
>  fs/ext4/super.c | 27 ++++++++++++++++-----------
>  1 file changed, 16 insertions(+), 11 deletions(-)
> 
> diff --git a/fs/ext4/super.c b/fs/ext4/super.c
> index 4770c98..921d5b4 100644
> --- a/fs/ext4/super.c
> +++ b/fs/ext4/super.c
> @@ -1131,6 +1131,8 @@ static const struct super_operations ext4_nojournal_sops = {
>  	.drop_inode	= ext4_drop_inode,
>  	.evict_inode	= ext4_evict_inode,
>  	.sync_fs	= ext4_sync_fs,
> +	.freeze_fs	= ext4_freeze,
> +	.unfreeze_fs	= ext4_unfreeze,
>  	.put_super	= ext4_put_super,
>  	.statfs		= ext4_statfs,
>  	.remount_fs	= ext4_remount,
> @@ -4758,23 +4760,26 @@ static int ext4_freeze(struct super_block *sb)
>  
>  	journal = EXT4_SB(sb)->s_journal;
>  
> -	/* Now we set up the journal barrier. */
> -	jbd2_journal_lock_updates(journal);
> +	if (journal) {
> +		/* Now we set up the journal barrier. */
> +		jbd2_journal_lock_updates(journal);
>  
> -	/*
> -	 * Don't clear the needs_recovery flag if we failed to flush
> -	 * the journal.
> -	 */
> -	error = jbd2_journal_flush(journal);
> -	if (error < 0)
> -		goto out;
> +		/*
> +		 * Don't clear the needs_recovery flag if we failed to
> +		 * flush the journal.
> +		 */
> +		error = jbd2_journal_flush(journal);
> +		if (error < 0)
> +			goto out;
> +	}
>  
>  	/* Journal blocked and flushed, clear needs_recovery flag. */
>  	EXT4_CLEAR_INCOMPAT_FEATURE(sb, EXT4_FEATURE_INCOMPAT_RECOVER);
>  	error = ext4_commit_super(sb, 1);
>  out:
> -	/* we rely on upper layer to stop further updates */
> -	jbd2_journal_unlock_updates(EXT4_SB(sb)->s_journal);
> +	if (journal)
> +		/* we rely on upper layer to stop further updates */
> +		jbd2_journal_unlock_updates(EXT4_SB(sb)->s_journal);
>  	return error;
>  }
>  
> -- 
> 2.1.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
-- 
Jan Kara <jack@suse.cz>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2014-09-23 12:33 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-18 20:26 [PATCH 1/3] ext4: fold ext4_sync_fs_nojournal() into ext4_sync_fs() Theodore Ts'o
2014-09-18 20:26 ` [PATCH 2/3] ext4: support freezing ext2 (nojournal) file systems Theodore Ts'o
2014-09-18 20:46   ` Andreas Dilger
2014-09-18 21:13     ` Theodore Ts'o
2014-09-23 12:33   ` Jan Kara
2014-09-18 20:26 ` [PATCH 3/3] ext4: fold ext4_nojournal_sops into ext4_sops Theodore Ts'o
2014-09-23 12:31   ` Jan Kara
2014-09-23 12:29 ` [PATCH 1/3] ext4: fold ext4_sync_fs_nojournal() into ext4_sync_fs() Jan Kara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.