mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-05 02:19:51 +00:00
btrfs: Remove isize local variable in compress_file_range
It's used only once so just inline the call to i_size_read. The semantics regarding the inode size are not changed, the pages in the range are locked and i_size cannot change between the time it was set and used. Reviewed-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
532425ff9e
commit
62b3762271
1 changed files with 1 additions and 2 deletions
|
@ -453,7 +453,6 @@ static noinline void compress_file_range(struct inode *inode,
|
||||||
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
|
struct btrfs_fs_info *fs_info = btrfs_sb(inode->i_sb);
|
||||||
u64 blocksize = fs_info->sectorsize;
|
u64 blocksize = fs_info->sectorsize;
|
||||||
u64 actual_end;
|
u64 actual_end;
|
||||||
u64 isize = i_size_read(inode);
|
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
struct page **pages = NULL;
|
struct page **pages = NULL;
|
||||||
unsigned long nr_pages;
|
unsigned long nr_pages;
|
||||||
|
@ -467,7 +466,7 @@ static noinline void compress_file_range(struct inode *inode,
|
||||||
inode_should_defrag(BTRFS_I(inode), start, end, end - start + 1,
|
inode_should_defrag(BTRFS_I(inode), start, end, end - start + 1,
|
||||||
SZ_16K);
|
SZ_16K);
|
||||||
|
|
||||||
actual_end = min_t(u64, isize, end + 1);
|
actual_end = min_t(u64, i_size_read(inode), end + 1);
|
||||||
again:
|
again:
|
||||||
will_compress = 0;
|
will_compress = 0;
|
||||||
nr_pages = (end >> PAGE_SHIFT) - (start >> PAGE_SHIFT) + 1;
|
nr_pages = (end >> PAGE_SHIFT) - (start >> PAGE_SHIFT) + 1;
|
||||||
|
|
Loading…
Reference in a new issue