<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/fs/udf/truncate.c, branch linux-rolling-stable</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-rolling-stable'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2025-05-22T12:31:47Z</updated>
<entry>
<title>udf: Make sure i_lenExtents is uptodate on inode eviction</title>
<updated>2025-05-22T12:31:47Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2025-05-07T09:49:41Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0ba93de82be4330f8fb677ec5d11f12629289ae3'/>
<id>urn:sha1:0ba93de82be4330f8fb677ec5d11f12629289ae3</id>
<content type='text'>
commit 55dd5b4db3bf04cf077a8d1712f6295d4517c337 upstream.

UDF maintains total length of all extents in i_lenExtents. Generally we
keep extent lengths (and thus i_lenExtents) block aligned because it
makes the file appending logic simpler. However the standard mandates
that the inode size must match the length of all extents and thus we
trim the last extent when closing the file. To catch possible bugs we
also verify that i_lenExtents matches i_size when evicting inode from
memory. Commit b405c1e58b73 ("udf: refactor udf_next_aext() to handle
error") however broke the code updating i_lenExtents and thus
udf_evict_inode() ended up spewing lots of errors about incorrectly
sized extents although the extents were actually sized properly. Fix the
updating of i_lenExtents to silence the errors.

Fixes: b405c1e58b73 ("udf: refactor udf_next_aext() to handle error")
CC: stable@vger.kernel.org
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>udf: refactor inode_bmap() to handle error</title>
<updated>2024-10-02T12:32:29Z</updated>
<author>
<name>Zhao Mengmeng</name>
</author>
<published>2024-10-01T11:54:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c226964ec786f3797ed389a16392ce4357697d24'/>
<id>urn:sha1:c226964ec786f3797ed389a16392ce4357697d24</id>
<content type='text'>
Refactor inode_bmap() to handle error since udf_next_aext() can return
error now. On situations like ftruncate, udf_extend_file() can now
detect errors and bail out early without resorting to checking for
particular offsets and assuming internal behavior of these functions.

Reported-by: syzbot+7a4842f0b1801230a989@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=7a4842f0b1801230a989
Tested-by: syzbot+7a4842f0b1801230a989@syzkaller.appspotmail.com
Signed-off-by: Zhao Mengmeng &lt;zhaomengmeng@kylinos.cn&gt;
Suggested-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Link: https://patch.msgid.link/20241001115425.266556-4-zhaomzhao@126.com
</content>
</entry>
<entry>
<title>udf: refactor udf_next_aext() to handle error</title>
<updated>2024-10-02T12:10:50Z</updated>
<author>
<name>Zhao Mengmeng</name>
</author>
<published>2024-10-01T11:54:24Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=b405c1e58b73981da0f8df03b00666b22b9397ae'/>
<id>urn:sha1:b405c1e58b73981da0f8df03b00666b22b9397ae</id>
<content type='text'>
Since udf_current_aext() has error handling, udf_next_aext() should have
error handling too. Besides, when too many indirect extents found in one
inode, return -EFSCORRUPTED; when reading block failed, return -EIO.

Signed-off-by: Zhao Mengmeng &lt;zhaomengmeng@kylinos.cn&gt;
Suggested-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Link: https://patch.msgid.link/20241001115425.266556-3-zhaomzhao@126.com
</content>
</entry>
<entry>
<title>udf: refactor udf_current_aext() to handle error</title>
<updated>2024-10-02T10:37:01Z</updated>
<author>
<name>Zhao Mengmeng</name>
</author>
<published>2024-10-01T11:54:23Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=ee703a7068f95764cfb62b57db1d36e465cb9b26'/>
<id>urn:sha1:ee703a7068f95764cfb62b57db1d36e465cb9b26</id>
<content type='text'>
As Jan suggested in links below, refactor udf_current_aext() to
differentiate between error, hit EOF and success, it now takes pointer to
etype to store the extent type, return 1 when getting etype success,
return 0 when hitting EOF and return -errno when err.

Link: https://lore.kernel.org/all/20240912111235.6nr3wuqvktecy3vh@quack3/
Signed-off-by: Zhao Mengmeng &lt;zhaomengmeng@kylinos.cn&gt;
Suggested-by: Jan Kara &lt;jack@suse.cz&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Link: https://patch.msgid.link/20241001115425.266556-2-zhaomzhao@126.com
</content>
</entry>
<entry>
<title>fs: udf: Replace GPL 2.0 boilerplate license notice with SPDX identifier</title>
<updated>2023-05-30T13:39:13Z</updated>
<author>
<name>Bagas Sanjaya</name>
</author>
<published>2023-05-22T00:54:34Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=5ce345541ee43333bfbd99a2ea56b1a0a167c457'/>
<id>urn:sha1:5ce345541ee43333bfbd99a2ea56b1a0a167c457</id>
<content type='text'>
The notice refers to full GPL 2.0 text on now defunct MIT FTP site [1].
Replace it with appropriate SPDX license identifier.

Cc: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Cc: Pali Rohár &lt;pali@kernel.org&gt;
Link: https://web.archive.org/web/20020809115410/ftp://prep.ai.mit.edu/pub/gnu/GPL [1]
Signed-off-by: Bagas Sanjaya &lt;bagasdotme@gmail.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20230522005434.22133-2-bagasdotme@gmail.com&gt;
</content>
</entry>
<entry>
<title>udf: use wrapper i_blocksize() in udf_discard_prealloc()</title>
<updated>2023-03-13T10:16:16Z</updated>
<author>
<name>Yangtao Li</name>
</author>
<published>2023-03-10T03:08:20Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=f768dc3cf74983107464bcd773167c92b85cb8f2'/>
<id>urn:sha1:f768dc3cf74983107464bcd773167c92b85cb8f2</id>
<content type='text'>
Convert to use i_blocksize() for readability.

Signed-off-by: Yangtao Li &lt;frank.li@vivo.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
Message-Id: &lt;20230310030821.66090-2-frank.li@vivo.com&gt;
</content>
</entry>
<entry>
<title>udf: Drop VARCONV support</title>
<updated>2023-01-26T15:46:32Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2023-01-18T12:27:07Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=101ee137d32adc5b53f5c2a61fbda8f70f994845'/>
<id>urn:sha1:101ee137d32adc5b53f5c2a61fbda8f70f994845</id>
<content type='text'>
UDF was supporting a strange mode where the media was containing 7
blocks of unknown data for every 32 blocks of the filesystem. I have yet
to see the media that would need such conversion (maybe it comes from
packet writing times) and the conversions have been inconsistent in the
code. In particular any write will write to a wrong block and corrupt
the media. This is an indication and no user actually needs this so
let's just drop the support instead of trying to fix it.

Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: remove redundant variable netype</title>
<updated>2023-01-09T09:39:53Z</updated>
<author>
<name>Colin Ian King</name>
</author>
<published>2023-01-05T13:49:25Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=1fb40763a58c1f8130c0131c624060c6bbb929b8'/>
<id>urn:sha1:1fb40763a58c1f8130c0131c624060c6bbb929b8</id>
<content type='text'>
The variable netype is assigned a value that is never read, the assignment
is redundant the variable can be removed.

Message-Id: &lt;20230105134925.45599-1-colin.i.king@gmail.com&gt;
Signed-off-by: Colin Ian King &lt;colin.i.king@gmail.com&gt;
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: Do not bother looking for prealloc extents if i_lenExtents matches i_size</title>
<updated>2022-12-09T11:37:26Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2022-12-07T16:34:33Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=6ad53f0f71c52871202a7bf096feb2c59db33fc5'/>
<id>urn:sha1:6ad53f0f71c52871202a7bf096feb2c59db33fc5</id>
<content type='text'>
If rounded block-rounded i_lenExtents matches block rounded i_size,
there are no preallocation extents. Do not bother walking extent linked
list.

CC: stable@vger.kernel.org
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
<entry>
<title>udf: Fix preallocation discarding at indirect extent boundary</title>
<updated>2022-12-09T11:37:26Z</updated>
<author>
<name>Jan Kara</name>
</author>
<published>2022-12-07T16:25:10Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cfe4c1b25dd6d2f056afc00b7c98bcb3dd0b1fc3'/>
<id>urn:sha1:cfe4c1b25dd6d2f056afc00b7c98bcb3dd0b1fc3</id>
<content type='text'>
When preallocation extent is the first one in the extent block, the
code would corrupt extent tree header instead. Fix the problem and use
udf_delete_aext() for deleting extent to avoid some code duplication.

CC: stable@vger.kernel.org
Signed-off-by: Jan Kara &lt;jack@suse.cz&gt;
</content>
</entry>
</feed>
