]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: fix misleading and incomplete comment of btrfs_truncate()
authorFilipe Manana <fdmanana@suse.com>
Mon, 24 May 2021 10:35:54 +0000 (11:35 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jun 2021 13:19:05 +0000 (15:19 +0200)
commitdacb7046f4daa5e751449776e9fae569f624ae30
tree6ee52ceb992e2f293a1257bdec6b3d70b6e8d9a8
parentfc6e913d4b0015f8aafdf0a8a6f496fa628d633a
btrfs: fix misleading and incomplete comment of btrfs_truncate()

The comment at the top of btrfs_truncate() mentions that csum items are
dropped or truncated to the new i_size, but this is wrong and non sense,
as they are unrelated to the i_size and are located in the csums tree and
not on a tree with inode items (fs/subvolume tree or a log tree). Instead
that claim applies to file extent items, so fix the comment to refer to
them instead.

While at it make the whole comment for the function more descriptive and
follow the kernel doc style.

Tested-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/inode.c