Skip to content

Commit 27afd93

Browse files
andy-shevgregkh
authored andcommitted
nfs/blocklayout: Fix compilation error (make W=1) in bl_write_pagelist()
[ Upstream commit f83c8dd ] Clang compiler is not happy about set but unused variable (when dprintk() is no-op): .../blocklayout/blocklayout.c:384:9: error: variable 'count' set but not used [-Werror,-Wunused-but-set-variable] Remove a leftover from the previous cleanup. Fixes: 3a6fd1f ("pnfs/blocklayout: remove read-modify-write handling in bl_write_pagelist") Acked-by: Anna Schumaker <anna.schumkaer@oracle.com> Reviewed-by: Jeff Layton <jlayton@kernel.org> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent a92648b commit 27afd93

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

fs/nfs/blocklayout/blocklayout.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -381,14 +381,13 @@ bl_write_pagelist(struct nfs_pgio_header *header, int sync)
381381
sector_t isect, extent_length = 0;
382382
struct parallel_io *par = NULL;
383383
loff_t offset = header->args.offset;
384-
size_t count = header->args.count;
385384
struct page **pages = header->args.pages;
386385
int pg_index = header->args.pgbase >> PAGE_SHIFT;
387386
unsigned int pg_len;
388387
struct blk_plug plug;
389388
int i;
390389

391-
dprintk("%s enter, %zu@%lld\n", __func__, count, offset);
390+
dprintk("%s enter, %u@%lld\n", __func__, header->args.count, offset);
392391

393392
/* At this point, header->page_aray is a (sequential) list of nfs_pages.
394393
* We want to write each, and if there is an error set pnfs_error
@@ -429,7 +428,6 @@ bl_write_pagelist(struct nfs_pgio_header *header, int sync)
429428
}
430429

431430
offset += pg_len;
432-
count -= pg_len;
433431
isect += (pg_len >> SECTOR_SHIFT);
434432
extent_length -= (pg_len >> SECTOR_SHIFT);
435433
}

0 commit comments

Comments
 (0)