Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs
Pull btrfs fixes from Chris Mason: "These are mostly bug fixes and a two small performance fixes. The most important of the bunch are Josef's fix for a snapshotting regression and Mark's update to fix compile problems on arm" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs: (25 commits) Btrfs: create the uuid tree on remount rw btrfs: change extent-same to copy entire argument struct Btrfs: dir_inode_operations should use btrfs_update_time also btrfs: Add btrfs: prefix to kernel log output btrfs: refuse to remount read-write after abort Btrfs: btrfs_ioctl_default_subvol: Revert back to toplevel subvolume when arg is 0 Btrfs: don't leak transaction in btrfs_sync_file() Btrfs: add the missing mutex unlock in write_all_supers() Btrfs: iput inode on allocation failure Btrfs: remove space_info->reservation_progress Btrfs: kill delay_iput arg to the wait_ordered functions Btrfs: fix worst case calculator for space usage Revert "Btrfs: rework the overcommit logic to be based on the total size" Btrfs: improve replacing nocow extents Btrfs: drop dir i_size when adding new names on replay Btrfs: replay dir_index items before other items Btrfs: check roots last log commit when checking if an inode has been logged Btrfs: actually log directory we are fsync()'ing Btrfs: actually limit the size of delalloc range Btrfs: allocate the free space by the existed max extent size when ENOSPC ...
This commit is contained in:
@@ -4688,11 +4688,11 @@ static void inode_tree_add(struct inode *inode)
|
||||
struct btrfs_inode *entry;
|
||||
struct rb_node **p;
|
||||
struct rb_node *parent;
|
||||
struct rb_node *new = &BTRFS_I(inode)->rb_node;
|
||||
u64 ino = btrfs_ino(inode);
|
||||
|
||||
if (inode_unhashed(inode))
|
||||
return;
|
||||
again:
|
||||
parent = NULL;
|
||||
spin_lock(&root->inode_lock);
|
||||
p = &root->inode_tree.rb_node;
|
||||
@@ -4707,14 +4707,14 @@ again:
|
||||
else {
|
||||
WARN_ON(!(entry->vfs_inode.i_state &
|
||||
(I_WILL_FREE | I_FREEING)));
|
||||
rb_erase(parent, &root->inode_tree);
|
||||
rb_replace_node(parent, new, &root->inode_tree);
|
||||
RB_CLEAR_NODE(parent);
|
||||
spin_unlock(&root->inode_lock);
|
||||
goto again;
|
||||
return;
|
||||
}
|
||||
}
|
||||
rb_link_node(&BTRFS_I(inode)->rb_node, parent, p);
|
||||
rb_insert_color(&BTRFS_I(inode)->rb_node, &root->inode_tree);
|
||||
rb_link_node(new, parent, p);
|
||||
rb_insert_color(new, &root->inode_tree);
|
||||
spin_unlock(&root->inode_lock);
|
||||
}
|
||||
|
||||
@@ -8216,6 +8216,10 @@ static int __start_delalloc_inodes(struct btrfs_root *root, int delay_iput)
|
||||
|
||||
work = btrfs_alloc_delalloc_work(inode, 0, delay_iput);
|
||||
if (unlikely(!work)) {
|
||||
if (delay_iput)
|
||||
btrfs_add_delayed_iput(inode);
|
||||
else
|
||||
iput(inode);
|
||||
ret = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
@@ -8613,11 +8617,13 @@ static const struct inode_operations btrfs_dir_inode_operations = {
|
||||
.removexattr = btrfs_removexattr,
|
||||
.permission = btrfs_permission,
|
||||
.get_acl = btrfs_get_acl,
|
||||
.update_time = btrfs_update_time,
|
||||
};
|
||||
static const struct inode_operations btrfs_dir_ro_inode_operations = {
|
||||
.lookup = btrfs_lookup,
|
||||
.permission = btrfs_permission,
|
||||
.get_acl = btrfs_get_acl,
|
||||
.update_time = btrfs_update_time,
|
||||
};
|
||||
|
||||
static const struct file_operations btrfs_dir_file_operations = {
|
||||
|
Reference in New Issue
Block a user