Message ID | 38eb656f778e10215d4b52a1bbb3401025b9110e.1695333082.git.fdmanana@suse.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | btrfs: some cleanups around inode update and helpers | expand |
On 2023/9/22 20:07, fdmanana@kernel.org wrote: > From: Filipe Manana <fdmanana@suse.com> > > The root argument for btrfs_delayed_update_inode() always matches the root > of the given inode, so remove the root argument and get it from the inode > argument. > > Signed-off-by: Filipe Manana <fdmanana@suse.com> Reviewed-by: Qu Wenruo <wqu@suse.com> Thanks, Qu > --- > fs/btrfs/delayed-inode.c | 2 +- > fs/btrfs/delayed-inode.h | 1 - > fs/btrfs/inode.c | 2 +- > 3 files changed, 2 insertions(+), 3 deletions(-) > > diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c > index 8ba045ae1d75..35d7616615c1 100644 > --- a/fs/btrfs/delayed-inode.c > +++ b/fs/btrfs/delayed-inode.c > @@ -1913,9 +1913,9 @@ int btrfs_fill_inode(struct inode *inode, u32 *rdev) > } > > int btrfs_delayed_update_inode(struct btrfs_trans_handle *trans, > - struct btrfs_root *root, > struct btrfs_inode *inode) > { > + struct btrfs_root *root = inode->root; > struct btrfs_delayed_node *delayed_node; > int ret = 0; > > diff --git a/fs/btrfs/delayed-inode.h b/fs/btrfs/delayed-inode.h > index dc1085b2a397..d050e572c7f9 100644 > --- a/fs/btrfs/delayed-inode.h > +++ b/fs/btrfs/delayed-inode.h > @@ -135,7 +135,6 @@ int btrfs_commit_inode_delayed_inode(struct btrfs_inode *inode); > > > int btrfs_delayed_update_inode(struct btrfs_trans_handle *trans, > - struct btrfs_root *root, > struct btrfs_inode *inode); > int btrfs_fill_inode(struct inode *inode, u32 *rdev); > int btrfs_delayed_delete_inode_ref(struct btrfs_inode *inode); > diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c > index c4b5d4047c5d..54647b7fb600 100644 > --- a/fs/btrfs/inode.c > +++ b/fs/btrfs/inode.c > @@ -4019,7 +4019,7 @@ int btrfs_update_inode(struct btrfs_trans_handle *trans, > && !test_bit(BTRFS_FS_LOG_RECOVERING, &fs_info->flags)) { > btrfs_update_root_times(trans, root); > > - ret = btrfs_delayed_update_inode(trans, root, inode); > + ret = btrfs_delayed_update_inode(trans, inode); > if (!ret) > btrfs_set_inode_last_trans(trans, inode); > return ret;
diff --git a/fs/btrfs/delayed-inode.c b/fs/btrfs/delayed-inode.c index 8ba045ae1d75..35d7616615c1 100644 --- a/fs/btrfs/delayed-inode.c +++ b/fs/btrfs/delayed-inode.c @@ -1913,9 +1913,9 @@ int btrfs_fill_inode(struct inode *inode, u32 *rdev) } int btrfs_delayed_update_inode(struct btrfs_trans_handle *trans, - struct btrfs_root *root, struct btrfs_inode *inode) { + struct btrfs_root *root = inode->root; struct btrfs_delayed_node *delayed_node; int ret = 0; diff --git a/fs/btrfs/delayed-inode.h b/fs/btrfs/delayed-inode.h index dc1085b2a397..d050e572c7f9 100644 --- a/fs/btrfs/delayed-inode.h +++ b/fs/btrfs/delayed-inode.h @@ -135,7 +135,6 @@ int btrfs_commit_inode_delayed_inode(struct btrfs_inode *inode); int btrfs_delayed_update_inode(struct btrfs_trans_handle *trans, - struct btrfs_root *root, struct btrfs_inode *inode); int btrfs_fill_inode(struct inode *inode, u32 *rdev); int btrfs_delayed_delete_inode_ref(struct btrfs_inode *inode); diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index c4b5d4047c5d..54647b7fb600 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -4019,7 +4019,7 @@ int btrfs_update_inode(struct btrfs_trans_handle *trans, && !test_bit(BTRFS_FS_LOG_RECOVERING, &fs_info->flags)) { btrfs_update_root_times(trans, root); - ret = btrfs_delayed_update_inode(trans, root, inode); + ret = btrfs_delayed_update_inode(trans, inode); if (!ret) btrfs_set_inode_last_trans(trans, inode); return ret;