Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'erofs-for-6.8-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs

Pull erofs fix from Gao Xiang:

- Fix page refcount leak when looking up specific inodes
introduced by metabuf reworking

* tag 'erofs-for-6.8-rc6-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs:
erofs: fix refcount on the metabuf used for inode lookup

+14 -14
+14 -14
fs/erofs/namei.c
··· 130 130 /* string comparison without already matched prefix */ 131 131 diff = erofs_dirnamecmp(name, &dname, &matched); 132 132 133 - if (!diff) { 134 - *_ndirents = 0; 135 - goto out; 136 - } else if (diff > 0) { 137 - head = mid + 1; 138 - startprfx = matched; 139 - 140 - if (!IS_ERR(candidate)) 141 - erofs_put_metabuf(target); 142 - *target = buf; 143 - candidate = de; 144 - *_ndirents = ndirents; 145 - } else { 133 + if (diff < 0) { 146 134 erofs_put_metabuf(&buf); 147 - 148 135 back = mid - 1; 149 136 endprfx = matched; 137 + continue; 150 138 } 139 + 140 + if (!IS_ERR(candidate)) 141 + erofs_put_metabuf(target); 142 + *target = buf; 143 + if (!diff) { 144 + *_ndirents = 0; 145 + return de; 146 + } 147 + head = mid + 1; 148 + startprfx = matched; 149 + candidate = de; 150 + *_ndirents = ndirents; 151 151 continue; 152 152 } 153 153 out: /* free if the candidate is valid */