]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - fs/xfs/libxfs/xfs_ialloc.c
xfs: fix inobt inode allocation search optimization
[mirror_ubuntu-bionic-kernel.git] / fs / xfs / libxfs / xfs_ialloc.c
index ffd5a15d1bb6d0955633d4e1f61f6a84aa79f3f7..abf5beaae907d32b484128f182bee2d1d7a7cd9e 100644 (file)
@@ -1246,13 +1246,13 @@ xfs_dialloc_ag_inobt(
 
                        /* free inodes to the left? */
                        if (useleft && trec.ir_freecount) {
-                               rec = trec;
                                xfs_btree_del_cursor(cur, XFS_BTREE_NOERROR);
                                cur = tcur;
 
                                pag->pagl_leftrec = trec.ir_startino;
                                pag->pagl_rightrec = rec.ir_startino;
                                pag->pagl_pagino = pagino;
+                               rec = trec;
                                goto alloc_inode;
                        }