linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Christoph Hellwig <hch@infradead.org>
To: Jan Kara <jack@suse.cz>
Cc: linux-fsdevel@vger.kernel.org
Subject: [PATCH 1/5] btrfs: remove ->write_super and stop maintaining ->s_dirt
Date: Mon, 27 Apr 2009 09:46:41 -0400	[thread overview]
Message-ID: <20090427134815.188242000@bombadil.infradead.org> (raw)
In-Reply-To: 20090427134640.128837000@bombadil.infradead.org

[-- Attachment #1: btrfs-remove-write_super --]
[-- Type: text/plain, Size: 3205 bytes --]

Signed-off-by: Christoph Hellwig <hch@lst.de>

Index: linux-2.6/fs/btrfs/inode.c
===================================================================
--- linux-2.6.orig/fs/btrfs/inode.c	2009-04-26 20:13:46.753074547 +0200
+++ linux-2.6/fs/btrfs/inode.c	2009-04-26 20:13:56.233950575 +0200
@@ -2260,7 +2260,6 @@ err:
 	btrfs_update_inode(trans, root, dir);
 	btrfs_drop_nlink(inode);
 	ret = btrfs_update_inode(trans, root, inode);
-	dir->i_sb->s_dirt = 1;
 out:
 	return ret;
 }
@@ -2744,7 +2743,6 @@ error:
 				      pending_del_nr);
 	}
 	btrfs_free_path(path);
-	inode->i_sb->s_dirt = 1;
 	return ret;
 }
 
@@ -3681,7 +3679,6 @@ static int btrfs_mknod(struct inode *dir
 		init_special_inode(inode, inode->i_mode, rdev);
 		btrfs_update_inode(trans, root, inode);
 	}
-	dir->i_sb->s_dirt = 1;
 	btrfs_update_inode_block_group(trans, inode);
 	btrfs_update_inode_block_group(trans, dir);
 out_unlock:
@@ -3746,7 +3743,6 @@ static int btrfs_create(struct inode *di
 		inode->i_op = &btrfs_file_inode_operations;
 		BTRFS_I(inode)->io_tree.ops = &btrfs_extent_io_ops;
 	}
-	dir->i_sb->s_dirt = 1;
 	btrfs_update_inode_block_group(trans, inode);
 	btrfs_update_inode_block_group(trans, dir);
 out_unlock:
@@ -3793,7 +3789,6 @@ static int btrfs_link(struct dentry *old
 	if (err)
 		drop_inode = 1;
 
-	dir->i_sb->s_dirt = 1;
 	btrfs_update_inode_block_group(trans, dir);
 	err = btrfs_update_inode(trans, root, inode);
 
@@ -3875,7 +3870,6 @@ static int btrfs_mkdir(struct inode *dir
 
 	d_instantiate(dentry, inode);
 	drop_on_err = 0;
-	dir->i_sb->s_dirt = 1;
 	btrfs_update_inode_block_group(trans, inode);
 	btrfs_update_inode_block_group(trans, dir);
 
@@ -4915,7 +4909,6 @@ static int btrfs_symlink(struct inode *d
 		inode->i_op = &btrfs_file_inode_operations;
 		BTRFS_I(inode)->io_tree.ops = &btrfs_extent_io_ops;
 	}
-	dir->i_sb->s_dirt = 1;
 	btrfs_update_inode_block_group(trans, inode);
 	btrfs_update_inode_block_group(trans, dir);
 	if (drop_inode)
Index: linux-2.6/fs/btrfs/super.c
===================================================================
--- linux-2.6.orig/fs/btrfs/super.c	2009-04-26 20:13:14.072949756 +0200
+++ linux-2.6/fs/btrfs/super.c	2009-04-26 20:13:36.733950315 +0200
@@ -381,7 +381,6 @@ int btrfs_sync_fs(struct super_block *sb
 	if (sb->s_flags & MS_RDONLY)
 		return 0;
 
-	sb->s_dirt = 0;
 	if (!wait) {
 		filemap_flush(root->fs_info->btree_inode->i_mapping);
 		return 0;
@@ -392,7 +391,6 @@ int btrfs_sync_fs(struct super_block *sb
 
 	trans = btrfs_start_transaction(root, 1);
 	ret = btrfs_commit_transaction(trans, root);
-	sb->s_dirt = 0;
 	return ret;
 }
 
@@ -431,11 +429,6 @@ static int btrfs_show_options(struct seq
 	return 0;
 }
 
-static void btrfs_write_super(struct super_block *sb)
-{
-	sb->s_dirt = 0;
-}
-
 static int btrfs_test_super(struct super_block *s, void *data)
 {
 	struct btrfs_fs_devices *test_fs_devices = data;
@@ -669,7 +662,6 @@ static int btrfs_unfreeze(struct super_b
 static struct super_operations btrfs_super_ops = {
 	.delete_inode	= btrfs_delete_inode,
 	.put_super	= btrfs_put_super,
-	.write_super	= btrfs_write_super,
 	.sync_fs	= btrfs_sync_fs,
 	.show_options	= btrfs_show_options,
 	.write_inode	= btrfs_write_inode,


  reply	other threads:[~2009-04-27 13:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-27 13:46 [PATCH 0/5] remove superflous ->write_super instances Christoph Hellwig
2009-04-27 13:46 ` Christoph Hellwig [this message]
2009-04-27 13:46 ` [PATCH 2/5] ext3: remove ->write_super and stop maintaining ->s_dirt Christoph Hellwig
2009-04-27 13:46 ` [PATCH 3/5] gfs2: " Christoph Hellwig
2009-04-27 15:49   ` Steven Whitehouse
2009-04-27 13:46 ` [PATCH 4/5] ocfs2: " Christoph Hellwig
2009-04-28 16:45   ` Joel Becker
2009-04-27 13:46 ` [PATCH 5/5] qnx4: remove ->write_super Christoph Hellwig
2009-04-27 14:32 ` [PATCH 0/5] remove superflous ->write_super instances Theodore Tso
2009-04-27 14:36   ` Christoph Hellwig
2009-04-27 16:54     ` Theodore Tso
2009-04-27 14:55 ` Jan Kara

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090427134815.188242000@bombadil.infradead.org \
    --to=hch@infradead.org \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).