On Thu, Jan 10, 2019 at 08:16:53PM +0200, Andy Shevchenko wrote: > There are new types and helpers that are supposed to be used in new code. > > As a preparation to get rid of legacy types and API functions do > the conversion here. > > Signed-off-by: Andy Shevchenko <andriy.shevche...@linux.intel.com> > --- > - not tested on actual FS > fs/btrfs/disk-io.c | 6 +++--- > fs/btrfs/ioctl.c | 12 ++---------- > fs/btrfs/root-tree.c | 4 +--- > fs/btrfs/transaction.c | 7 +++---- > 4 files changed, 9 insertions(+), 20 deletions(-) > > diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c > index e0ad52804c26..f618661f5fa4 100644 > --- a/fs/btrfs/disk-io.c > +++ b/fs/btrfs/disk-io.c > @@ -1259,7 +1259,6 @@ struct btrfs_root *btrfs_create_tree(struct > btrfs_trans_handle *trans, > struct btrfs_root *root; > struct btrfs_key key; > int ret = 0; > - uuid_le uuid = NULL_UUID_LE; > > root = btrfs_alloc_root(fs_info, GFP_KERNEL); > if (!root) > @@ -1293,8 +1292,9 @@ struct btrfs_root *btrfs_create_tree(struct > btrfs_trans_handle *trans, > btrfs_set_root_last_snapshot(&root->root_item, 0); > btrfs_set_root_dirid(&root->root_item, 0); > if (is_fstree(objectid)) > - uuid_le_gen(&uuid); > - memcpy(root->root_item.uuid, uuid.b, BTRFS_UUID_SIZE); > + guid_gen((guid_t *)&root->root_item.uuid); > + else > + guid_copy((guid_t *)&root->root_item.uuid, &guid_null);
I don't like the type casts, a simple wrapper would be better I think.