From: Nikolay Borisov <nborisov@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: Nikolay Borisov <nborisov@suse.com>
Subject: [PATCH 06/14] btrfs: Make btrfs_update_inode_item take btrfs_inode
Date: Mon, 2 Nov 2020 16:48:58 +0200 [thread overview]
Message-ID: <20201102144906.3767963-7-nborisov@suse.com> (raw)
In-Reply-To: <20201102144906.3767963-1-nborisov@suse.com>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
---
fs/btrfs/inode.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index e4993706a7fa..4165eb322c11 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -3450,7 +3450,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;
@@ -3462,8 +3463,7 @@ static noinline int btrfs_update_inode_item(struct btrfs_trans_handle *trans,
return -ENOMEM;
path->leave_spinning = 1;
- 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;
@@ -3474,9 +3474,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);
@@ -3510,7 +3510,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,
@@ -3521,7 +3521,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;
}
--
2.25.1
next prev parent reply other threads:[~2020-11-02 14:49 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-02 14:48 [PATCH 00/14] Another batch of inode vs btrfs_inode cleanups Nikolay Borisov
2020-11-02 14:48 ` [PATCH 01/14] btrfs: Make btrfs_inode_safe_disk_i_size_write take btrfs_inode Nikolay Borisov
2020-11-02 14:48 ` [PATCH 02/14] btrfs: Make insert_prealloc_file_extent " Nikolay Borisov
2020-11-02 14:48 ` [PATCH 03/14] btrfs: Make btrfs_truncate_inode_items " Nikolay Borisov
2020-11-05 14:45 ` David Sterba
2020-11-02 14:48 ` [PATCH 04/14] btrfs: Make btrfs_finish_ordered_io btrfs_inode-centric Nikolay Borisov
2020-11-02 14:48 ` [PATCH 05/14] btrfs: Make btrfs_delayed_update_inode take btrfs_inode Nikolay Borisov
2020-11-02 14:48 ` Nikolay Borisov [this message]
2020-11-02 14:48 ` [PATCH 07/14] btrfs: Make btrfs_update_inode " Nikolay Borisov
2020-11-02 14:49 ` [PATCH 08/14] btrfs: Make maybe_insert_hole " Nikolay Borisov
2020-11-02 14:49 ` [PATCH 09/14] btrfs: Make find_first_non_hole " Nikolay Borisov
2020-11-02 14:49 ` [PATCH 10/14] btrfs: Make btrfs_insert_replace_extent " Nikolay Borisov
2020-11-02 14:49 ` [PATCH 11/14] btrfs: Make btrfs_truncate_block " Nikolay Borisov
2020-11-02 14:49 ` [PATCH 12/14] btrfs: Make btrfs_cont_expand " Nikolay Borisov
2020-11-02 14:49 ` [PATCH 13/14] btrfs: Make btrfs_drop_extents " Nikolay Borisov
2020-11-02 14:49 ` [PATCH 14/14] btrfs: Make btrfs_update_inode_fallback " Nikolay Borisov
2020-11-02 15:48 ` [PATCH 00/14] Another batch of inode vs btrfs_inode cleanups Johannes Thumshirn
2020-11-02 16:10 ` David Sterba
2020-11-02 16:25 ` Johannes Thumshirn
2020-11-05 16:21 ` David Sterba
2020-11-12 18:25 ` David Sterba
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=20201102144906.3767963-7-nborisov@suse.com \
--to=nborisov@suse.com \
--cc=linux-btrfs@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).