From: Andrew Morton <akpm@linux-foundation•org>
To: Kees Cook <kees@outflux•net>
Cc: Stephen Rothwell <sfr@canb•auug.org.au>,
linux-next@vger•kernel.org, linux-kernel@vger•kernel.org,
Theodore Ts'o <tytso@mit•edu>, Dave Chinner <dchinner@redhat•com>
Subject: Re: linux-next: manual merge of the akpm tree with the ext4 tree
Date: Fri, 9 Aug 2013 15:34:07 -0700 [thread overview]
Message-ID: <20130809153407.3bcf44fadd4fa99472fb70b8@linux-foundation.org> (raw)
In-Reply-To: <20130809222104.GY2280@outflux.net>
On Fri, 9 Aug 2013 15:21:04 -0700 Kees Cook <kees@outflux•net> wrote:
> Hi,
>
> On Wed, Aug 07, 2013 at 03:19:03PM +1000, Stephen Rothwell wrote:
> > Hi Andrew,
> >
> > list_for_each_safe(cur, tmp, &sbi->s_es_lru) {
> > + int ret;
> > +
> > /*
> > * If we have already reclaimed all extents from extent
> > * status tree, just stop the loop immediately.
>
> Which is masking the "ret" at the start, leading to warnings at build-time:
>
> fs/ext4/extents_status.c: In function _____ext4_es_shrink___:
> fs/ext4/extents_status.c:950:6: warning: unused variable ___ret___ [-Wunused-variable]
yup.
From: Andrew Morton <akpm@linux-foundation•org>
Subject: fs-convert-fs-shrinkers-to-new-scan-count-api-fix-fix-2
fix shadowed local, spell "skipped" correctly
Cc: Dave Chinner <dchinner@redhat•com>
Cc: Glauber Costa <glommer@openvz•org>
Cc: Kees Cook <kees@outflux•net>
Signed-off-by: Andrew Morton <akpm@linux-foundation•org>
---
fs/ext4/extents_status.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
diff -puN fs/ext4/extents_status.c~fs-convert-fs-shrinkers-to-new-scan-count-api-fix-fix-2 fs/ext4/extents_status.c
--- a/fs/ext4/extents_status.c~fs-convert-fs-shrinkers-to-new-scan-count-api-fix-fix-2
+++ a/fs/ext4/extents_status.c
@@ -946,15 +946,15 @@ static int __ext4_es_shrink(struct ext4_
{
struct ext4_inode_info *ei;
struct list_head *cur, *tmp;
- LIST_HEAD(skiped);
- int ret, nr_shrunk = 0;
+ LIST_HEAD(skipped);
+ int nr_shrunk = 0;
int retried = 0, skip_precached = 1, nr_skipped = 0;
spin_lock(&sbi->s_es_lru_lock);
retry:
list_for_each_safe(cur, tmp, &sbi->s_es_lru) {
- int ret;
+ int shrunk;
/*
* If we have already reclaimed all extents from extent
@@ -974,7 +974,7 @@ retry:
(skip_precached && ext4_test_inode_state(&ei->vfs_inode,
EXT4_STATE_EXT_PRECACHED))) {
nr_skipped++;
- list_move_tail(cur, &skiped);
+ list_move_tail(cur, &skipped);
continue;
}
@@ -982,19 +982,19 @@ retry:
continue;
write_lock(&ei->i_es_lock);
- ret = __es_try_to_reclaim_extents(ei, nr_to_scan);
+ shrunk = __es_try_to_reclaim_extents(ei, nr_to_scan);
if (ei->i_es_lru_nr == 0)
list_del_init(&ei->i_es_lru);
write_unlock(&ei->i_es_lock);
- nr_shrunk += ret;
- nr_to_scan -= ret;
+ nr_shrunk += shrunk;
+ nr_to_scan -= shrunk;
if (nr_to_scan == 0)
break;
}
/* Move the newer inodes into the tail of the LRU list. */
- list_splice_tail(&skiped, &sbi->s_es_lru);
+ list_splice_tail(&skipped, &sbi->s_es_lru);
/*
* If we skipped any inodes, and we weren't able to make any
_
next prev parent reply other threads:[~2013-08-09 22:34 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-07 5:19 linux-next: manual merge of the akpm tree with the ext4 tree Stephen Rothwell
2013-08-09 22:21 ` Kees Cook
2013-08-09 22:34 ` Andrew Morton [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-08-07 5:16 Stephen Rothwell
2013-07-16 4:56 Stephen Rothwell
2013-07-16 4:53 Stephen Rothwell
2013-06-19 7:27 Stephen Rothwell
2013-06-19 7:44 ` Glauber Costa
2013-06-19 7:45 ` Stephen Rothwell
2013-06-19 14:20 ` Theodore Ts'o
2013-06-19 17:06 ` Andrew Morton
2013-06-19 18:59 ` Theodore Ts'o
2013-06-19 21:08 ` Glauber Costa
2013-06-19 7:48 ` Zheng Liu
2012-07-16 6:52 Stephen Rothwell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130809153407.3bcf44fadd4fa99472fb70b8@linux-foundation.org \
--to=akpm@linux-foundation$(echo .)org \
--cc=dchinner@redhat$(echo .)com \
--cc=kees@outflux$(echo .)net \
--cc=linux-kernel@vger$(echo .)kernel.org \
--cc=linux-next@vger$(echo .)kernel.org \
--cc=sfr@canb$(echo .)auug.org.au \
--cc=tytso@mit$(echo .)edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox