File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -257,7 +257,6 @@ void bch2_readahead(struct readahead_control *ractl)
257257 struct bch_inode_info * inode = to_bch_ei (ractl -> mapping -> host );
258258 struct bch_fs * c = inode -> v .i_sb -> s_fs_info ;
259259 struct bch_io_opts opts ;
260- struct btree_trans * trans = bch2_trans_get (c );
261260 struct folio * folio ;
262261 struct readpages_iter readpages_iter ;
263262
@@ -269,6 +268,7 @@ void bch2_readahead(struct readahead_control *ractl)
269268
270269 bch2_pagecache_add_get (inode );
271270
271+ struct btree_trans * trans = bch2_trans_get (c );
272272 while ((folio = readpage_iter_peek (& readpages_iter ))) {
273273 unsigned n = min_t (unsigned ,
274274 readpages_iter .folios .nr -
@@ -289,10 +289,10 @@ void bch2_readahead(struct readahead_control *ractl)
289289 & readpages_iter );
290290 bch2_trans_unlock (trans );
291291 }
292+ bch2_trans_put (trans );
292293
293294 bch2_pagecache_add_put (inode );
294295
295- bch2_trans_put (trans );
296296 darray_exit (& readpages_iter .folios );
297297}
298298
You can’t perform that action at this time.
0 commit comments