Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

btrfs: zlib: drop redundant folio address variable

We're caching the current output folio address but it's not really
necessary as we store it in the variable and then pass it to the stream
context. We can read the folio address directly.

Signed-off-by: David Sterba <dsterba@suse.com>

+3 -7
+3 -7
fs/btrfs/zlib.c
··· 157 157 const u32 min_folio_size = btrfs_min_folio_size(fs_info); 158 158 int ret; 159 159 char *data_in = NULL; 160 - char *cfolio_out; 161 160 struct folio *in_folio = NULL; 162 161 struct folio *out_folio = NULL; 163 162 const u32 blocksize = fs_info->sectorsize; ··· 179 180 ret = -ENOMEM; 180 181 goto out; 181 182 } 182 - cfolio_out = folio_address(out_folio); 183 183 184 184 workspace->strm.next_in = workspace->buf; 185 185 workspace->strm.avail_in = 0; 186 - workspace->strm.next_out = cfolio_out; 186 + workspace->strm.next_out = folio_address(out_folio); 187 187 workspace->strm.avail_out = min_folio_size; 188 188 189 189 while (workspace->strm.total_in < len) { ··· 261 263 ret = -ENOMEM; 262 264 goto out; 263 265 } 264 - cfolio_out = folio_address(out_folio); 265 266 workspace->strm.avail_out = min_folio_size; 266 - workspace->strm.next_out = cfolio_out; 267 + workspace->strm.next_out = folio_address(out_folio); 267 268 } 268 269 /* We're all done. */ 269 270 if (workspace->strm.total_in >= len) ··· 298 301 ret = -ENOMEM; 299 302 goto out; 300 303 } 301 - cfolio_out = folio_address(out_folio); 302 304 workspace->strm.avail_out = min_folio_size; 303 - workspace->strm.next_out = cfolio_out; 305 + workspace->strm.next_out = folio_address(out_folio); 304 306 } 305 307 } 306 308 /* Queue the remaining part of the folio. */