<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux.git/fs/erofs, branch v6.11</title>
<subtitle>Linux kernel source tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/'/>
<entry>
<title>erofs: fix out-of-bound access when z_erofs_gbuf_growsize() partially fails</title>
<updated>2024-08-21T00:12:05+00:00</updated>
<author>
<name>Gao Xiang</name>
<email>hsiangkao@linux.alibaba.com</email>
</author>
<published>2024-08-20T08:56:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=0005e01e1e875c5e27130c5e2ed0189749d1e08a'/>
<id>0005e01e1e875c5e27130c5e2ed0189749d1e08a</id>
<content type='text'>
If z_erofs_gbuf_growsize() partially fails on a global buffer due to
memory allocation failure or fault injection (as reported by syzbot [1]),
new pages need to be freed by comparing to the existing pages to avoid
memory leaks.

However, the old gbuf-&gt;pages[] array may not be large enough, which can
lead to null-ptr-deref or out-of-bound access.

Fix this by checking against gbuf-&gt;nrpages in advance.

[1] https://lore.kernel.org/r/000000000000f7b96e062018c6e3@google.com

Reported-by: syzbot+242ee56aaa9585553766@syzkaller.appspotmail.com
Fixes: d6db47e571dc ("erofs: do not use pagepool in z_erofs_gbuf_growsize()")
Cc: &lt;stable@vger.kernel.org&gt; # 6.10+
Reviewed-by: Chunhai Guo &lt;guochunhai@vivo.com&gt;
Reviewed-by: Sandeep Dhavale &lt;dhavale@google.com&gt;
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20240820085619.1375963-1-hsiangkao@linux.alibaba.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If z_erofs_gbuf_growsize() partially fails on a global buffer due to
memory allocation failure or fault injection (as reported by syzbot [1]),
new pages need to be freed by comparing to the existing pages to avoid
memory leaks.

However, the old gbuf-&gt;pages[] array may not be large enough, which can
lead to null-ptr-deref or out-of-bound access.

Fix this by checking against gbuf-&gt;nrpages in advance.

[1] https://lore.kernel.org/r/000000000000f7b96e062018c6e3@google.com

Reported-by: syzbot+242ee56aaa9585553766@syzkaller.appspotmail.com
Fixes: d6db47e571dc ("erofs: do not use pagepool in z_erofs_gbuf_growsize()")
Cc: &lt;stable@vger.kernel.org&gt; # 6.10+
Reviewed-by: Chunhai Guo &lt;guochunhai@vivo.com&gt;
Reviewed-by: Sandeep Dhavale &lt;dhavale@google.com&gt;
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20240820085619.1375963-1-hsiangkao@linux.alibaba.com
</pre>
</div>
</content>
</entry>
<entry>
<title>erofs: allow large folios for compressed files</title>
<updated>2024-08-19T08:10:04+00:00</updated>
<author>
<name>Gao Xiang</name>
<email>hsiangkao@linux.alibaba.com</email>
</author>
<published>2024-08-19T02:52:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=e080a26725fb36f535f22ea42694c60ab005fb2e'/>
<id>e080a26725fb36f535f22ea42694c60ab005fb2e</id>
<content type='text'>
As commit 2e6506e1c4ee ("mm/migrate: fix deadlock in
migrate_pages_batch() on large folios") has landed upstream, large
folios can be safely enabled for compressed inodes since all
prerequisites have already landed in 6.11-rc1.

Stress tests has been running on my fleet for over 20 days without any
regression.  Additionally, users [1] have requested it for months.
Let's allow large folios for EROFS full cases upstream now for wider
testing.

[1] https://lore.kernel.org/r/CAGsJ_4wtE8OcpinuqVwG4jtdx6Qh5f+TON6wz+4HMCq=A2qFcA@mail.gmail.com

Cc: Barry Song &lt;21cnbao@gmail.com&gt;
Cc: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
[ Gao Xiang: minor commit typo fixes. ]
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20240819025207.3808649-1-hsiangkao@linux.alibaba.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As commit 2e6506e1c4ee ("mm/migrate: fix deadlock in
migrate_pages_batch() on large folios") has landed upstream, large
folios can be safely enabled for compressed inodes since all
prerequisites have already landed in 6.11-rc1.

Stress tests has been running on my fleet for over 20 days without any
regression.  Additionally, users [1] have requested it for months.
Let's allow large folios for EROFS full cases upstream now for wider
testing.

[1] https://lore.kernel.org/r/CAGsJ_4wtE8OcpinuqVwG4jtdx6Qh5f+TON6wz+4HMCq=A2qFcA@mail.gmail.com

Cc: Barry Song &lt;21cnbao@gmail.com&gt;
Cc: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
[ Gao Xiang: minor commit typo fixes. ]
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20240819025207.3808649-1-hsiangkao@linux.alibaba.com
</pre>
</div>
</content>
</entry>
<entry>
<title>erofs: get rid of check_layout_compatibility()</title>
<updated>2024-08-19T03:06:20+00:00</updated>
<author>
<name>Hongzhen Luo</name>
<email>hongzhen@linux.alibaba.com</email>
</author>
<published>2024-08-06T11:22:08+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=2c534624ae70100aeea0b5800b0f3768b2fd3cf0'/>
<id>2c534624ae70100aeea0b5800b0f3768b2fd3cf0</id>
<content type='text'>
Simple enough to just open-code it.

Signed-off-by: Hongzhen Luo &lt;hongzhen@linux.alibaba.com&gt;
Reviewed-by: Sandeep Dhavale &lt;dhavale@google.com&gt;
Reviewed-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20240806112208.150323-1-hongzhen@linux.alibaba.com
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Simple enough to just open-code it.

Signed-off-by: Hongzhen Luo &lt;hongzhen@linux.alibaba.com&gt;
Reviewed-by: Sandeep Dhavale &lt;dhavale@google.com&gt;
Reviewed-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20240806112208.150323-1-hongzhen@linux.alibaba.com
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>erofs: simplify readdir operation</title>
<updated>2024-08-19T03:06:20+00:00</updated>
<author>
<name>Hongzhen Luo</name>
<email>hongzhen@linux.alibaba.com</email>
</author>
<published>2024-08-01T11:26:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5b5c96c63d5b6e91c622611e04b2b156bbae53f5'/>
<id>5b5c96c63d5b6e91c622611e04b2b156bbae53f5</id>
<content type='text'>
 - Use i_size instead of i_size_read() due to immutable fses;

 - Get rid of an unneeded goto since erofs_fill_dentries() also works;

 - Remove unnecessary lines.

Signed-off-by: Hongzhen Luo &lt;hongzhen@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20240801112622.2164029-1-hongzhen@linux.alibaba.com
Reviewed-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
 - Use i_size instead of i_size_read() due to immutable fses;

 - Get rid of an unneeded goto since erofs_fill_dentries() also works;

 - Remove unnecessary lines.

Signed-off-by: Hongzhen Luo &lt;hongzhen@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20240801112622.2164029-1-hongzhen@linux.alibaba.com
Reviewed-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>erofs: convert comma to semicolon</title>
<updated>2024-07-26T10:48:12+00:00</updated>
<author>
<name>Chen Ni</name>
<email>nichen@iscas.ac.cn</email>
</author>
<published>2024-07-24T02:07:21+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=14e9283fb22d0d259820a5f05c6059678bab9ac5'/>
<id>14e9283fb22d0d259820a5f05c6059678bab9ac5</id>
<content type='text'>
Replace a comma between expression statements by a semicolon.

Signed-off-by: Chen Ni &lt;nichen@iscas.ac.cn&gt;
Link: https://lore.kernel.org/r/20240724020721.2389738-1-nichen@iscas.ac.cn
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace a comma between expression statements by a semicolon.

Signed-off-by: Chen Ni &lt;nichen@iscas.ac.cn&gt;
Link: https://lore.kernel.org/r/20240724020721.2389738-1-nichen@iscas.ac.cn
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>erofs: support multi-page folios for erofs_bread()</title>
<updated>2024-07-26T10:47:57+00:00</updated>
<author>
<name>Gao Xiang</name>
<email>hsiangkao@linux.alibaba.com</email>
</author>
<published>2024-07-23T07:30:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=5d3bb77e5fce1d224b94da31abae0a7afed54735'/>
<id>5d3bb77e5fce1d224b94da31abae0a7afed54735</id>
<content type='text'>
If the requested page is part of the previous multi-page folio, there
is no need to call read_mapping_folio() again.

Also, get rid of the remaining one of page-&gt;index [1] in our codebase.

[1] https://lore.kernel.org/r/Zp8fgUSIBGQ1TN0D@casper.infradead.org

Cc: Matthew Wilcox &lt;willy@infradead.org&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20240723073024.875290-1-hsiangkao@linux.alibaba.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If the requested page is part of the previous multi-page folio, there
is no need to call read_mapping_folio() again.

Also, get rid of the remaining one of page-&gt;index [1] in our codebase.

[1] https://lore.kernel.org/r/Zp8fgUSIBGQ1TN0D@casper.infradead.org

Cc: Matthew Wilcox &lt;willy@infradead.org&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20240723073024.875290-1-hsiangkao@linux.alibaba.com
</pre>
</div>
</content>
</entry>
<entry>
<title>erofs: add support for FS_IOC_GETFSSYSFSPATH</title>
<updated>2024-07-26T10:47:46+00:00</updated>
<author>
<name>Huang Xiaojia</name>
<email>huangxiaojia2@huawei.com</email>
</author>
<published>2024-07-20T08:23:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=684b290abc774202ff88897648f24520f40c916b'/>
<id>684b290abc774202ff88897648f24520f40c916b</id>
<content type='text'>
FS_IOC_GETFSSYSFSPATH ioctl exposes /sys/fs path of a given filesystem,
potentially standarizing sysfs reporting. This patch add support for
FS_IOC_GETFSSYSFSPATH for erofs, "erofs/&lt;dev&gt;" will be outputted for bdev
cases, "erofs/[domain_id,]&lt;fs_id&gt;" will be outputted for fscache cases.

Signed-off-by: Huang Xiaojia &lt;huangxiaojia2@huawei.com&gt;
Link: https://lore.kernel.org/r/20240720082335.441563-1-huangxiaojia2@huawei.com
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
FS_IOC_GETFSSYSFSPATH ioctl exposes /sys/fs path of a given filesystem,
potentially standarizing sysfs reporting. This patch add support for
FS_IOC_GETFSSYSFSPATH for erofs, "erofs/&lt;dev&gt;" will be outputted for bdev
cases, "erofs/[domain_id,]&lt;fs_id&gt;" will be outputted for fscache cases.

Signed-off-by: Huang Xiaojia &lt;huangxiaojia2@huawei.com&gt;
Link: https://lore.kernel.org/r/20240720082335.441563-1-huangxiaojia2@huawei.com
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>erofs: fix race in z_erofs_get_gbuf()</title>
<updated>2024-07-26T10:47:33+00:00</updated>
<author>
<name>Gao Xiang</name>
<email>hsiangkao@linux.alibaba.com</email>
</author>
<published>2024-07-22T03:51:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=7dc5537c3f8be87e005f0844a7626c987914f8fd'/>
<id>7dc5537c3f8be87e005f0844a7626c987914f8fd</id>
<content type='text'>
In z_erofs_get_gbuf(), the current task may be migrated to another
CPU between `z_erofs_gbuf_id()` and `spin_lock(&amp;gbuf-&gt;lock)`.

Therefore, z_erofs_put_gbuf() will trigger the following issue
which was found by stress test:

&lt;2&gt;[772156.434168] kernel BUG at fs/erofs/zutil.c:58!
..
&lt;4&gt;[772156.435007]
&lt;4&gt;[772156.439237] CPU: 0 PID: 3078 Comm: stress Kdump: loaded Tainted: G            E      6.10.0-rc7+ #2
&lt;4&gt;[772156.439239] Hardware name: Alibaba Cloud Alibaba Cloud ECS, BIOS 1.0.0 01/01/2017
&lt;4&gt;[772156.439241] pstate: 83400005 (Nzcv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--)
&lt;4&gt;[772156.439243] pc : z_erofs_put_gbuf+0x64/0x70 [erofs]
&lt;4&gt;[772156.439252] lr : z_erofs_lz4_decompress+0x600/0x6a0 [erofs]
..
&lt;6&gt;[772156.445958] stress (3127): drop_caches: 1
&lt;4&gt;[772156.446120] Call trace:
&lt;4&gt;[772156.446121]  z_erofs_put_gbuf+0x64/0x70 [erofs]
&lt;4&gt;[772156.446761]  z_erofs_lz4_decompress+0x600/0x6a0 [erofs]
&lt;4&gt;[772156.446897]  z_erofs_decompress_queue+0x740/0xa10 [erofs]
&lt;4&gt;[772156.447036]  z_erofs_runqueue+0x428/0x8c0 [erofs]
&lt;4&gt;[772156.447160]  z_erofs_readahead+0x224/0x390 [erofs]
..

Fixes: f36f3010f676 ("erofs: rename per-CPU buffers to global buffer pool and make it configurable")
Cc: &lt;stable@vger.kernel.org&gt; # 6.10+
Reviewed-by: Chunhai Guo &lt;guochunhai@vivo.com&gt;
Reviewed-by: Sandeep Dhavale &lt;dhavale@google.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20240722035110.3456740-1-hsiangkao@linux.alibaba.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In z_erofs_get_gbuf(), the current task may be migrated to another
CPU between `z_erofs_gbuf_id()` and `spin_lock(&amp;gbuf-&gt;lock)`.

Therefore, z_erofs_put_gbuf() will trigger the following issue
which was found by stress test:

&lt;2&gt;[772156.434168] kernel BUG at fs/erofs/zutil.c:58!
..
&lt;4&gt;[772156.435007]
&lt;4&gt;[772156.439237] CPU: 0 PID: 3078 Comm: stress Kdump: loaded Tainted: G            E      6.10.0-rc7+ #2
&lt;4&gt;[772156.439239] Hardware name: Alibaba Cloud Alibaba Cloud ECS, BIOS 1.0.0 01/01/2017
&lt;4&gt;[772156.439241] pstate: 83400005 (Nzcv daif +PAN -UAO +TCO +DIT -SSBS BTYPE=--)
&lt;4&gt;[772156.439243] pc : z_erofs_put_gbuf+0x64/0x70 [erofs]
&lt;4&gt;[772156.439252] lr : z_erofs_lz4_decompress+0x600/0x6a0 [erofs]
..
&lt;6&gt;[772156.445958] stress (3127): drop_caches: 1
&lt;4&gt;[772156.446120] Call trace:
&lt;4&gt;[772156.446121]  z_erofs_put_gbuf+0x64/0x70 [erofs]
&lt;4&gt;[772156.446761]  z_erofs_lz4_decompress+0x600/0x6a0 [erofs]
&lt;4&gt;[772156.446897]  z_erofs_decompress_queue+0x740/0xa10 [erofs]
&lt;4&gt;[772156.447036]  z_erofs_runqueue+0x428/0x8c0 [erofs]
&lt;4&gt;[772156.447160]  z_erofs_readahead+0x224/0x390 [erofs]
..

Fixes: f36f3010f676 ("erofs: rename per-CPU buffers to global buffer pool and make it configurable")
Cc: &lt;stable@vger.kernel.org&gt; # 6.10+
Reviewed-by: Chunhai Guo &lt;guochunhai@vivo.com&gt;
Reviewed-by: Sandeep Dhavale &lt;dhavale@google.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20240722035110.3456740-1-hsiangkao@linux.alibaba.com
</pre>
</div>
</content>
</entry>
<entry>
<title>erofs: support STATX_DIOALIGN</title>
<updated>2024-07-26T10:47:22+00:00</updated>
<author>
<name>Hongbo Li</name>
<email>lihongbo22@huawei.com</email>
</author>
<published>2024-07-18T08:32:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=9c421ef3f6b30ab912eaaa3c3d20cfb921fd8c8f'/>
<id>9c421ef3f6b30ab912eaaa3c3d20cfb921fd8c8f</id>
<content type='text'>
Add support for STATX_DIOALIGN to EROFS, so that direct I/O
alignment restrictions are exposed to userspace in a generic
way.

[Before]
```
./statx_test /mnt/erofs/testfile
statx(/mnt/erofs/testfile) = 0
dio mem align:0
dio offset align:0
```

[After]
```
./statx_test /mnt/erofs/testfile
statx(/mnt/erofs/testfile) = 0
dio mem align:512
dio offset align:512
```

Signed-off-by: Hongbo Li &lt;lihongbo22@huawei.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20240718083243.2485437-1-hsiangkao@linux.alibaba.com
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add support for STATX_DIOALIGN to EROFS, so that direct I/O
alignment restrictions are exposed to userspace in a generic
way.

[Before]
```
./statx_test /mnt/erofs/testfile
statx(/mnt/erofs/testfile) = 0
dio mem align:0
dio offset align:0
```

[After]
```
./statx_test /mnt/erofs/testfile
statx(/mnt/erofs/testfile) = 0
dio mem align:512
dio offset align:512
```

Signed-off-by: Hongbo Li &lt;lihongbo22@huawei.com&gt;
Reviewed-by: Chao Yu &lt;chao@kernel.org&gt;
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
Link: https://lore.kernel.org/r/20240718083243.2485437-1-hsiangkao@linux.alibaba.com
</pre>
</div>
</content>
</entry>
<entry>
<title>erofs: silence uninitialized variable warning in z_erofs_scan_folio()</title>
<updated>2024-07-13T04:47:34+00:00</updated>
<author>
<name>Dan Carpenter</name>
<email>dan.carpenter@linaro.org</email>
</author>
<published>2024-07-13T01:04:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux.git/commit/?id=a3c10bed330b7ab401254a0c91098a03b04f1448'/>
<id>a3c10bed330b7ab401254a0c91098a03b04f1448</id>
<content type='text'>
Smatch complains that:

    fs/erofs/zdata.c:1047 z_erofs_scan_folio()
    error: uninitialized symbol 'err'.

The issue is if we hit this (!(map-&gt;m_flags &amp; EROFS_MAP_MAPPED)) {
condition then "err" isn't set.  It's inside a loop so we would have to
hit that condition on every iteration.  Initialize "err" to zero to
solve this.

Fixes: 5b9654efb604 ("erofs: teach z_erofs_scan_folios() to handle multi-page folios")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Link: https://lore.kernel.org/r/f78ab50e-ed6d-4275-8dd4-a4159fa565a2@stanley.mountain
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Smatch complains that:

    fs/erofs/zdata.c:1047 z_erofs_scan_folio()
    error: uninitialized symbol 'err'.

The issue is if we hit this (!(map-&gt;m_flags &amp; EROFS_MAP_MAPPED)) {
condition then "err" isn't set.  It's inside a loop so we would have to
hit that condition on every iteration.  Initialize "err" to zero to
solve this.

Fixes: 5b9654efb604 ("erofs: teach z_erofs_scan_folios() to handle multi-page folios")
Signed-off-by: Dan Carpenter &lt;dan.carpenter@linaro.org&gt;
Link: https://lore.kernel.org/r/f78ab50e-ed6d-4275-8dd4-a4159fa565a2@stanley.mountain
Signed-off-by: Gao Xiang &lt;hsiangkao@linux.alibaba.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
