summaryrefslogtreecommitdiff
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2020-11-02 17:48:58 +0300
committerDavid Sterba <dsterba@suse.com>2020-12-08 17:54:11 +0300
commitdfeb9e7cc3ed0d7e4a307e9c4a714c2950b2a9e4 (patch)
tree70ff91ce89bbe932690bc8acfebbef8d290defd8 /fs/btrfs/inode.c
parentf3fbcaef59927b811a5219e4201510e2df11e6ac (diff)
downloadlinux-dfeb9e7cc3ed0d7e4a307e9c4a714c2950b2a9e4.tar.xz
btrfs: make btrfs_update_inode_item take btrfs_inode
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com> Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 32250919f177..1b2bb73d1d99 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -3621,7 +3621,8 @@ static void fill_inode_item(struct btrfs_trans_handle *trans,
* copy everything in the in-memory inode into the btree.
*/
static noinline int btrfs_update_inode_item(struct btrfs_trans_handle *trans,
- struct btrfs_root *root, struct inode *inode)
+ struct btrfs_root *root,
+ struct btrfs_inode *inode)
{
struct btrfs_inode_item *inode_item;
struct btrfs_path *path;
@@ -3632,8 +3633,7 @@ static noinline int btrfs_update_inode_item(struct btrfs_trans_handle *trans,
if (!path)
return -ENOMEM;
- ret = btrfs_lookup_inode(trans, root, path, &BTRFS_I(inode)->location,
- 1);
+ ret = btrfs_lookup_inode(trans, root, path, &inode->location, 1);
if (ret) {
if (ret > 0)
ret = -ENOENT;
@@ -3644,9 +3644,9 @@ static noinline int btrfs_update_inode_item(struct btrfs_trans_handle *trans,
inode_item = btrfs_item_ptr(leaf, path->slots[0],
struct btrfs_inode_item);
- fill_inode_item(trans, leaf, inode_item, inode);
+ fill_inode_item(trans, leaf, inode_item, &inode->vfs_inode);
btrfs_mark_buffer_dirty(leaf);
- btrfs_set_inode_last_trans(trans, BTRFS_I(inode));
+ btrfs_set_inode_last_trans(trans, inode);
ret = 0;
failed:
btrfs_free_path(path);
@@ -3680,7 +3680,7 @@ noinline int btrfs_update_inode(struct btrfs_trans_handle *trans,
return ret;
}
- return btrfs_update_inode_item(trans, root, inode);
+ return btrfs_update_inode_item(trans, root, BTRFS_I(inode));
}
noinline int btrfs_update_inode_fallback(struct btrfs_trans_handle *trans,
@@ -3691,7 +3691,7 @@ noinline int btrfs_update_inode_fallback(struct btrfs_trans_handle *trans,
ret = btrfs_update_inode(trans, root, inode);
if (ret == -ENOSPC)
- return btrfs_update_inode_item(trans, root, inode);
+ return btrfs_update_inode_item(trans, root, BTRFS_I(inode));
return ret;
}