Commit 265c1fac authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Tim Shimmin

[XFS] fix sparse shadowed variable warnings

- in xfs_probe_cluster rename the inner len to pg_len. There's no harm
  here because the outer len isn't used after the inner len comes into
  existence but it keeps the code clean.
- in xfs_da_do_buf remove the inner i because they don't overlap
  and they are both the same type.

SGI-PV: 968555
SGI-Modid: xfs-linux-melb:xfs-kern:29311a
Signed-off-by: default avatarChristoph Hellwig <hch@infradead.org>
Signed-off-by: default avatarDavid Chinner <dgc@sgi.com>
Signed-off-by: default avatarTim Shimmin <tes@sgi.com>
parent ee5c8023
...@@ -652,7 +652,7 @@ xfs_probe_cluster( ...@@ -652,7 +652,7 @@ xfs_probe_cluster(
for (i = 0; i < pagevec_count(&pvec); i++) { for (i = 0; i < pagevec_count(&pvec); i++) {
struct page *page = pvec.pages[i]; struct page *page = pvec.pages[i];
size_t pg_offset, len = 0; size_t pg_offset, pg_len = 0;
if (tindex == tlast) { if (tindex == tlast) {
pg_offset = pg_offset =
...@@ -665,16 +665,16 @@ xfs_probe_cluster( ...@@ -665,16 +665,16 @@ xfs_probe_cluster(
pg_offset = PAGE_CACHE_SIZE; pg_offset = PAGE_CACHE_SIZE;
if (page->index == tindex && !TestSetPageLocked(page)) { if (page->index == tindex && !TestSetPageLocked(page)) {
len = xfs_probe_page(page, pg_offset, mapped); pg_len = xfs_probe_page(page, pg_offset, mapped);
unlock_page(page); unlock_page(page);
} }
if (!len) { if (!pg_len) {
done = 1; done = 1;
break; break;
} }
total += len; total += pg_len;
tindex++; tindex++;
} }
......
...@@ -1975,7 +1975,6 @@ xfs_da_do_buf( ...@@ -1975,7 +1975,6 @@ xfs_da_do_buf(
error = mappedbno == -2 ? 0 : XFS_ERROR(EFSCORRUPTED); error = mappedbno == -2 ? 0 : XFS_ERROR(EFSCORRUPTED);
if (unlikely(error == EFSCORRUPTED)) { if (unlikely(error == EFSCORRUPTED)) {
if (xfs_error_level >= XFS_ERRLEVEL_LOW) { if (xfs_error_level >= XFS_ERRLEVEL_LOW) {
int i;
cmn_err(CE_ALERT, "xfs_da_do_buf: bno %lld\n", cmn_err(CE_ALERT, "xfs_da_do_buf: bno %lld\n",
(long long)bno); (long long)bno);
cmn_err(CE_ALERT, "dir: inode %lld\n", cmn_err(CE_ALERT, "dir: inode %lld\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment