Signed-off-by: Kent Overstreet <[email protected]>
---
 fs/bcachefs/async_objs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/fs/bcachefs/async_objs.c b/fs/bcachefs/async_objs.c
index a7cd1f0f0964..e368c765eb46 100644
--- a/fs/bcachefs/async_objs.c
+++ b/fs/bcachefs/async_objs.c
@@ -80,12 +80,11 @@ static ssize_t bch2_async_obj_list_read(struct file *file, 
char __user *buf,
                        break;
 
                list->obj_to_text(&i->buf, obj);
+               i->iter = iter.pos;
        }
 
        if (i->buf.allocation_failure)
                ret = -ENOMEM;
-       else
-               i->iter = iter.pos;
 
        if (!ret)
                ret = bch2_debugfs_flush_buf(i);
-- 
2.50.0


Reply via email to