Subject: linux-next: manual merge of the vfs tree with the ext4 tree

From: Stephen Rothwell <[email-masked]>
Date: Tue, 19 May 2009 14:23:06 +1000

Hi Al, Ted,

Today's linux-next merge of the vfs tree got a conflict in
fs/ext4/super.c between commit cb0765fe4c3db8c9c22f1ed1017cbced2dd68150
("ext4: Add a comprehensive block validity check to ext4_get_blocks()")
from the ext4 tree and various commits from the vfs tree.

Just context changes.  I fixed it up (see below - please check as I am
not sure of the ordering constraints in the first hunk) and can carry the
fixup as necessary.
-- 
Cheers,
Stephen Rothwell                    [email-masked]

diff --cc fs/ext4/super.c
index eca6c05,d789833..0000000
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@@ -568,7 -564,11 +569,12 @@@ static void ext4_put_super(struct super
  	struct ext4_super_block *es = sbi->s_es;
  	int i, err;
  
+ 	lock_super(sb);
+ 	lock_kernel();
+ 	if (sb->s_dirt)
+ 		ext4_write_super_locked(sb);
+ 
 +	ext4_release_system_zone(sb);
  	ext4_mb_release(sb);
  	ext4_ext_release(sb);
  	ext4_xattr_put_super(sb);
@@@ -3322,11 -3268,30 +3325,18 @@@ int ext4_force_commit(struct super_bloc
  	return ret;
  }
  
- static void ext4_write_super(struct super_block *sb)
 -/*
 - * Ext4 always journals updates to the superblock itself, so we don't
 - * have to propagate any other updates to the superblock on disk at this
 - * point.  (We can probably nuke this function altogether, and remove
 - * any mention to sb->s_dirt in all of fs/ext4; eventual cleanup...)
 - */
+ static void ext4_write_super_locked(struct super_block *sb)
  {
 -	if (EXT4_SB(sb)->s_journal) {
 -		if (mutex_trylock(&sb->s_lock) != 0)
 -			BUG();
 -		sb->s_dirt = 0;
 -	} else {
 -		ext4_commit_super(sb, EXT4_SB(sb)->s_es, 1);
 -	}
 +	ext4_commit_super(sb, 1);
  }
  
+ static void ext4_write_super(struct super_block *sb)
+ {
+ 	lock_super(sb);
+ 	ext4_write_super_locked(sb);
+ 	unlock_super(sb);
+ }
+ 
  static int ext4_sync_fs(struct super_block *sb, int wait)
  {
  	int ret = 0;