diff options
author | Nikolay Borisov <n.borisov.lkml@gmail.com> | 2017-01-10 20:35:34 +0200 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2017-02-14 15:50:52 +0100 |
commit | fcabdd1ca51f9fd6ced977b2279da19d123b7512 (patch) | |
tree | 4ef4ec9331b2a408e674b4712c35c393c04b304d /fs/btrfs/delayed-inode.c | |
parent | e5517a7bffafdeb78ebbfb4cbee1878fb88427e5 (diff) | |
download | linux-fcabdd1ca51f9fd6ced977b2279da19d123b7512.tar.gz linux-fcabdd1ca51f9fd6ced977b2279da19d123b7512.tar.bz2 linux-fcabdd1ca51f9fd6ced977b2279da19d123b7512.zip |
btrfs: Make btrfs_delayed_inode_reserve_metadata take btrfs_inode
Signed-off-by: Nikolay Borisov <n.borisov.lkml@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/delayed-inode.c')
-rw-r--r-- | fs/btrfs/delayed-inode.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c index 0e8a8a5166d3..aa7032d1c5ae 100644 --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/delayed-inode.c @@ -572,7 +572,7 @@ static void btrfs_delayed_item_release_metadata(struct btrfs_fs_info *fs_info, static int btrfs_delayed_inode_reserve_metadata( struct btrfs_trans_handle *trans, struct btrfs_root *root, - struct inode *inode, + struct btrfs_inode *inode, struct btrfs_delayed_node *node) { struct btrfs_fs_info *fs_info = root->fs_info; @@ -601,13 +601,13 @@ static int btrfs_delayed_inode_reserve_metadata( * worth which is less likely to hurt us. */ if (src_rsv && src_rsv->type == BTRFS_BLOCK_RSV_DELALLOC) { - spin_lock(&BTRFS_I(inode)->lock); + spin_lock(&inode->lock); if (test_and_clear_bit(BTRFS_INODE_DELALLOC_META_RESERVED, - &BTRFS_I(inode)->runtime_flags)) + &inode->runtime_flags)) release = true; else src_rsv = NULL; - spin_unlock(&BTRFS_I(inode)->lock); + spin_unlock(&inode->lock); } /* @@ -635,7 +635,7 @@ static int btrfs_delayed_inode_reserve_metadata( node->bytes_reserved = num_bytes; trace_btrfs_space_reservation(fs_info, "delayed_inode", - btrfs_ino(BTRFS_I(inode)), + btrfs_ino(inode), num_bytes, 1); } return ret; @@ -658,13 +658,13 @@ static int btrfs_delayed_inode_reserve_metadata( */ if (!ret) { trace_btrfs_space_reservation(fs_info, "delayed_inode", - btrfs_ino(BTRFS_I(inode)), num_bytes, 1); + btrfs_ino(inode), num_bytes, 1); node->bytes_reserved = num_bytes; } if (release) { trace_btrfs_space_reservation(fs_info, "delalloc", - btrfs_ino(BTRFS_I(inode)), num_bytes, 0); + btrfs_ino(inode), num_bytes, 0); btrfs_block_rsv_release(fs_info, src_rsv, num_bytes); } @@ -1839,7 +1839,7 @@ int btrfs_delayed_update_inode(struct btrfs_trans_handle *trans, goto release_node; } - ret = btrfs_delayed_inode_reserve_metadata(trans, root, inode, + ret = btrfs_delayed_inode_reserve_metadata(trans, root, BTRFS_I(inode), delayed_node); if (ret) goto release_node; |