On 2016/5/27 23:43, Josef Bacik wrote:

 fs/btrfs/free-space-cache.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/fs/btrfs/free-space-cache.c b/fs/btrfs/free-space-cache.c
index 5e6062c..05c9ef8 100644
--- a/fs/btrfs/free-space-cache.c
+++ b/fs/btrfs/free-space-cache.c
@@ -3662,6 +3662,7 @@ have_info:
             if (tmp->offset + tmp->bytes < offset)
                 break;
             if (offset + bytes < tmp->offset) {
+                info = tmp;
                 n = rb_prev(&info->offset_index);
                 continue;
             }
@@ -3676,6 +3677,7 @@ have_info:
             if (offset + bytes < tmp->offset)
                 break;
             if (tmp->offset + tmp->bytes < offset) {
+                info = tmp;
                 n = rb_next(&info->offset_index);
                 continue;
             }


Just make it rb_next(&tmp->offset_index)/rb_prev(&tmp->offset_index) instead of doing the info = tmp thing. Thanks,

Josef

I will change it in v2, thanks
Feifei

--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to