Commit 59d697b7 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Al Viro

btrfs: remove ->write_super and stop maintaining ->s_dirt

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent c3f8a40c
...@@ -2322,7 +2322,6 @@ err: ...@@ -2322,7 +2322,6 @@ err:
btrfs_update_inode(trans, root, dir); btrfs_update_inode(trans, root, dir);
btrfs_drop_nlink(inode); btrfs_drop_nlink(inode);
ret = btrfs_update_inode(trans, root, inode); ret = btrfs_update_inode(trans, root, inode);
dir->i_sb->s_dirt = 1;
out: out:
return ret; return ret;
} }
...@@ -2806,7 +2805,6 @@ error: ...@@ -2806,7 +2805,6 @@ error:
pending_del_nr); pending_del_nr);
} }
btrfs_free_path(path); btrfs_free_path(path);
inode->i_sb->s_dirt = 1;
return ret; return ret;
} }
...@@ -3768,7 +3766,6 @@ static int btrfs_mknod(struct inode *dir, struct dentry *dentry, ...@@ -3768,7 +3766,6 @@ static int btrfs_mknod(struct inode *dir, struct dentry *dentry,
init_special_inode(inode, inode->i_mode, rdev); init_special_inode(inode, inode->i_mode, rdev);
btrfs_update_inode(trans, root, inode); 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, inode);
btrfs_update_inode_block_group(trans, dir); btrfs_update_inode_block_group(trans, dir);
out_unlock: out_unlock:
...@@ -3833,7 +3830,6 @@ static int btrfs_create(struct inode *dir, struct dentry *dentry, ...@@ -3833,7 +3830,6 @@ static int btrfs_create(struct inode *dir, struct dentry *dentry,
inode->i_op = &btrfs_file_inode_operations; inode->i_op = &btrfs_file_inode_operations;
BTRFS_I(inode)->io_tree.ops = &btrfs_extent_io_ops; 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, inode);
btrfs_update_inode_block_group(trans, dir); btrfs_update_inode_block_group(trans, dir);
out_unlock: out_unlock:
...@@ -3880,7 +3876,6 @@ static int btrfs_link(struct dentry *old_dentry, struct inode *dir, ...@@ -3880,7 +3876,6 @@ static int btrfs_link(struct dentry *old_dentry, struct inode *dir,
if (err) if (err)
drop_inode = 1; drop_inode = 1;
dir->i_sb->s_dirt = 1;
btrfs_update_inode_block_group(trans, dir); btrfs_update_inode_block_group(trans, dir);
err = btrfs_update_inode(trans, root, inode); err = btrfs_update_inode(trans, root, inode);
...@@ -3962,7 +3957,6 @@ static int btrfs_mkdir(struct inode *dir, struct dentry *dentry, int mode) ...@@ -3962,7 +3957,6 @@ static int btrfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
d_instantiate(dentry, inode); d_instantiate(dentry, inode);
drop_on_err = 0; drop_on_err = 0;
dir->i_sb->s_dirt = 1;
btrfs_update_inode_block_group(trans, inode); btrfs_update_inode_block_group(trans, inode);
btrfs_update_inode_block_group(trans, dir); btrfs_update_inode_block_group(trans, dir);
...@@ -4991,7 +4985,6 @@ static int btrfs_symlink(struct inode *dir, struct dentry *dentry, ...@@ -4991,7 +4985,6 @@ static int btrfs_symlink(struct inode *dir, struct dentry *dentry,
inode->i_op = &btrfs_file_inode_operations; inode->i_op = &btrfs_file_inode_operations;
BTRFS_I(inode)->io_tree.ops = &btrfs_extent_io_ops; 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, inode);
btrfs_update_inode_block_group(trans, dir); btrfs_update_inode_block_group(trans, dir);
if (drop_inode) if (drop_inode)
......
...@@ -397,7 +397,6 @@ int btrfs_sync_fs(struct super_block *sb, int wait) ...@@ -397,7 +397,6 @@ int btrfs_sync_fs(struct super_block *sb, int wait)
if (sb->s_flags & MS_RDONLY) if (sb->s_flags & MS_RDONLY)
return 0; return 0;
sb->s_dirt = 0;
if (!wait) { if (!wait) {
filemap_flush(root->fs_info->btree_inode->i_mapping); filemap_flush(root->fs_info->btree_inode->i_mapping);
return 0; return 0;
...@@ -408,7 +407,6 @@ int btrfs_sync_fs(struct super_block *sb, int wait) ...@@ -408,7 +407,6 @@ int btrfs_sync_fs(struct super_block *sb, int wait)
trans = btrfs_start_transaction(root, 1); trans = btrfs_start_transaction(root, 1);
ret = btrfs_commit_transaction(trans, root); ret = btrfs_commit_transaction(trans, root);
sb->s_dirt = 0;
return ret; return ret;
} }
...@@ -454,11 +452,6 @@ static int btrfs_show_options(struct seq_file *seq, struct vfsmount *vfs) ...@@ -454,11 +452,6 @@ static int btrfs_show_options(struct seq_file *seq, struct vfsmount *vfs)
return 0; 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) static int btrfs_test_super(struct super_block *s, void *data)
{ {
struct btrfs_fs_devices *test_fs_devices = data; struct btrfs_fs_devices *test_fs_devices = data;
...@@ -689,7 +682,6 @@ static int btrfs_unfreeze(struct super_block *sb) ...@@ -689,7 +682,6 @@ static int btrfs_unfreeze(struct super_block *sb)
static struct super_operations btrfs_super_ops = { static struct super_operations btrfs_super_ops = {
.delete_inode = btrfs_delete_inode, .delete_inode = btrfs_delete_inode,
.put_super = btrfs_put_super, .put_super = btrfs_put_super,
.write_super = btrfs_write_super,
.sync_fs = btrfs_sync_fs, .sync_fs = btrfs_sync_fs,
.show_options = btrfs_show_options, .show_options = btrfs_show_options,
.write_inode = btrfs_write_inode, .write_inode = btrfs_write_inode,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment