fs: export variant of generic_write_checks without iov_iter
authorOmar Sandoval <osandov@fb.com>
Thu, 12 Aug 2021 22:34:57 +0000 (15:34 -0700)
committerDavid Sterba <dsterba@suse.com>
Mon, 28 Feb 2022 15:20:02 +0000 (16:20 +0100)
commit49c597f55600c2da3e745567a3ec423f83e2509a
treeeee7f70ab92d7be9201b6c463b36e1110dbe5efd
parent9af2d06d6d4db38c9c0b251f9279f41ecc0de2fe
fs: export variant of generic_write_checks without iov_iter

Encoded I/O in Btrfs needs to check a write with a given logical size
without an iov_iter that matches that size (because the iov_iter we have
is for the compressed data). So, factor out the parts of
generic_write_check() that don't need an iov_iter into a new
generic_write_checks_count() function and export that.

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: Omar Sandoval <osandov@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/read_write.c
include/linux/fs.h