diff options
author | Josef Bacik <jbacik@fusionio.com> | 2013-07-22 12:50:37 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-10-13 18:14:32 -0700 |
commit | 6593b34b1251c27d1949878f04bf58130d47625f (patch) | |
tree | cddbc40373940f97ae48ed351e1024914428a23a | |
parent | 557801d93e4f3e77c7149da1acd6b068c32c90fb (diff) | |
download | kernel-common-6593b34b1251c27d1949878f04bf58130d47625f.tar.gz kernel-common-6593b34b1251c27d1949878f04bf58130d47625f.tar.bz2 kernel-common-6593b34b1251c27d1949878f04bf58130d47625f.zip |
Btrfs: reset ret in record_one_backref
commit 50f1319cb5f7690e4d9de18d1a75ea89296d0e53 upstream.
I was getting warnings when running find ./ -type f -exec btrfs fi defrag -f {}
\; from record_one_backref because ret was set. Turns out it was because it was
set to 1 because the search slot didn't come out exact and we never reset it.
So reset it to 0 right after the search so we don't leak this and get
uneccessary warnings. Thanks,
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
Signed-off-by: Chris Mason <chris.mason@fusionio.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | fs/btrfs/inode.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index 021694c08181..d3280b2b7592 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -2132,6 +2132,7 @@ static noinline int record_one_backref(u64 inum, u64 offset, u64 root_id, WARN_ON(1); return ret; } + ret = 0; while (1) { cond_resched(); @@ -2181,8 +2182,6 @@ static noinline int record_one_backref(u64 inum, u64 offset, u64 root_id, old->len || extent_offset + num_bytes <= old->extent_offset + old->offset) continue; - - ret = 0; break; } |