<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/git/torvalds/linux-2.6.git/fs/ntfs/lcnalloc.c, branch master</title>
<subtitle>Linux kernel source tree</subtitle>
<id>https://git.landau.one/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/atom?h=master</id>
<link rel='self' href='https://git.landau.one/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/atom?h=master'/>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/'/>
<updated>2026-08-26T11:16:02+00:00</updated>
<entry>
<title>ntfs: skip free cluster decrement when rollback fails</title>
<updated>2026-08-26T11:16:02+00:00</updated>
<author>
<name>Baolin Liu</name>
<email>liubaolin@kylinos.cn</email>
</author>
<published>2026-08-21T05:32:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/commit/?id=5f2a22b36fe34c98f6d5e35ddb759ee53d684145'/>
<id>urn:sha1:5f2a22b36fe34c98f6d5e35ddb759ee53d684145</id>
<content type='text'>
When the rollback in __ntfs_cluster_free() fails, the recursive
call returns a negative errno and the subsequent
ntfs_dec_free_clusters(vol, delta) subtracts that negative value,
adding bogus clusters to the counter on an already-failing volume.

Skip the decrement when the rollback failed.

Fixes: 11ccc9107dc4 ("ntfs: update runlist handling and cluster allocator")
Signed-off-by: Baolin Liu &lt;liubaolin@kylinos.cn&gt;
Reviewed-by: Hyunchul Lee &lt;hyc.lee@gmail.com&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ntfs: only count successfully cleared runs when freeing clusters</title>
<updated>2026-08-26T11:15:56+00:00</updated>
<author>
<name>Baolin Liu</name>
<email>liubaolin@kylinos.cn</email>
</author>
<published>2026-08-21T05:32:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/commit/?id=be9e89ccb8e52a3e4b67feeb03ebd8133091dc7e'/>
<id>urn:sha1:be9e89ccb8e52a3e4b67feeb03ebd8133091dc7e</id>
<content type='text'>
ntfs_cluster_free_from_rl_nolock() adds a run's length to nr_freed
whenever the error bookkeeping condition is false, which includes
cases where ntfs_bitmap_clear_run() actually failed - e.g. a second
run failing with the same errno as an earlier one, or any failure
after a non-ENOMEM error was already recorded. Since a failed
ntfs_bitmap_clear_run() rolls back its partial modifications, no
bits were cleared for that run, yet its length still inflates
vol-&gt;free_clusters, corrupting statfs output and the allocator's
free space gate.

Only count runs whose bitmap clear succeeded.

Fixes: 11ccc9107dc4 ("ntfs: update runlist handling and cluster allocator")
Signed-off-by: Baolin Liu &lt;liubaolin@kylinos.cn&gt;
Reviewed-by: Hyunchul Lee &lt;hyc.lee@gmail.com&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ntfs: bound the free-cluster bitmap scan to the volume</title>
<updated>2026-08-19T09:16:45+00:00</updated>
<author>
<name>Bryam Vargas</name>
<email>hexlabsecurity@proton.me</email>
</author>
<published>2026-07-26T23:29:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/commit/?id=19cac7902a8ab748e15f98ddaafcf5f8882be21d'/>
<id>urn:sha1:19cac7902a8ab748e15f98ddaafcf5f8882be21d</id>
<content type='text'>
vol-&gt;lcn_empty_bits_per_page is sized from vol-&gt;nr_clusters at mount, but
ntfs_cluster_alloc() bounds its scan of that array by the size of $Bitmap.
Those are independent on-disk quantities and the mount-time check only
rejects a $Bitmap that is too small, so an image whose $Bitmap covers more
clusters than the volume has lets the scan index past the array.  A run
whose LCN lies in that gap takes the allocator straight there, since the
caller passes the file's own last LCN as its locality hint.  KASAN reports
a slab out-of-bounds read when a file on such a volume is extended.

Clamp the scan to what that array covers, mirroring the max_index
calculation the mount-time scan already uses, and reject a decoded LCN
at or beyond nr_clusters in the mapping pairs decoder.  Conforming
volumes are unaffected.

Fixes: 11ccc9107dc4 ("ntfs: update runlist handling and cluster allocator")
Cc: stable@vger.kernel.org
Signed-off-by: Bryam Vargas &lt;hexlabsecurity@proton.me&gt;
Reviewed-by: Hyunchul Lee &lt;hyc.lee@gmail.com&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ntfs: fix variable dereferenced before check warnings</title>
<updated>2026-03-16T11:27:45+00:00</updated>
<author>
<name>Hyunchul Lee</name>
<email>hyc.lee@gmail.com</email>
</author>
<published>2026-03-12T23:59:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/commit/?id=4e59f8a1a82beaa49d7796648fc4dc538eff6485'/>
<id>urn:sha1:4e59f8a1a82beaa49d7796648fc4dc538eff6485</id>
<content type='text'>
Detected by Smatch.

lcnalloc.c:736 ntfs_cluster_alloc() error:
  we previously assumed 'rl' could be null (see line 719)

inode.c:3275 ntfs_inode_close() warn:
  variable dereferenced before check 'tmp_nis' (see line 3255)

attrib.c:4952 ntfs_attr_remove() warn:
  variable dereferenced before check 'ni' (see line 4951)

dir.c:1035 ntfs_readdir() error:
  we previously assumed 'private' could be null (see line 850)

Signed-off-by: Hyunchul Lee &lt;hyc.lee@gmail.com&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ntfs: prefer IS_ERR_OR_NULL() over manual NULL check</title>
<updated>2026-03-16T11:27:42+00:00</updated>
<author>
<name>Hyunchul Lee</name>
<email>hyc.lee@gmail.com</email>
</author>
<published>2026-03-11T02:13:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/commit/?id=7cf4b3c768fda4076af25d5c4bb4a6267e32d42d'/>
<id>urn:sha1:7cf4b3c768fda4076af25d5c4bb4a6267e32d42d</id>
<content type='text'>
Use IS_ERR_OR_NULL() instead of manual NULL and IS_ERR() checks.

Signed-off-by: Hyunchul Lee &lt;hyc.lee@gmail.com&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ntfs: change mft_no type to u64</title>
<updated>2026-03-06T13:08:39+00:00</updated>
<author>
<name>Namjae Jeon</name>
<email>linkinjeon@kernel.org</email>
</author>
<published>2026-03-05T01:40:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/commit/?id=d9038d99fb5c623f43bcd8b726bfbbe8562648c2'/>
<id>urn:sha1:d9038d99fb5c623f43bcd8b726bfbbe8562648c2</id>
<content type='text'>
Changes the type of ntfs_inode::mft_no from unsigned long to u64
to safely handle the full 48-bit range without truncation risk, especially
in preparation for broader VFS inode number type (i_ino:u64) and to
improve consistency with ntfs driver practices.

Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>ntfs: update runlist handling and cluster allocator</title>
<updated>2026-02-19T12:50:52+00:00</updated>
<author>
<name>Namjae Jeon</name>
<email>linkinjeon@kernel.org</email>
</author>
<published>2026-02-13T01:44:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/commit/?id=11ccc9107dc460de28af90fac1f42404d9802735'/>
<id>urn:sha1:11ccc9107dc460de28af90fac1f42404d9802735</id>
<content type='text'>
Updates runlist handling and cluster allocation to support
contiguous allocations and filesystem trimming.

Improve the runlist API to handle allocation failures and introduces
discard support.

Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Hyunchul Lee &lt;hyc.lee@gmail.com&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>Revert "fs: Remove NTFS classic"</title>
<updated>2026-02-19T12:48:05+00:00</updated>
<author>
<name>Namjae Jeon</name>
<email>linkinjeon@kernel.org</email>
</author>
<published>2025-12-30T05:24:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/commit/?id=1e9ea7e04472d4e5e12e58c881eaacfb3e49b669'/>
<id>urn:sha1:1e9ea7e04472d4e5e12e58c881eaacfb3e49b669</id>
<content type='text'>
This reverts commit 7ffa8f3d30236e0ab897c30bdb01224ff1fe1c89.

Reverts the removal of the classic read-only ntfs driver to
serve as the base for a new read-write ntfs implementation.
If we stack changes on top of the revert patch, It will significantly
reduce the diff size, making the review easier.

This revert intentionally excludes the restoration of Kconfig and
Makefile. The Kconfig and Makefile will be added back in the final patch
of this series, enabling the driver only after all features and
improvements have been applied.

Acked-by: Christoph Hellwig &lt;hch@lst.de&gt;
Signed-off-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
</content>
</entry>
<entry>
<title>fs: Remove NTFS classic</title>
<updated>2024-01-24T09:47:00+00:00</updated>
<author>
<name>Matthew Wilcox (Oracle)</name>
<email>willy@infradead.org</email>
</author>
<published>2024-01-15T07:20:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/commit/?id=7ffa8f3d30236e0ab897c30bdb01224ff1fe1c89'/>
<id>urn:sha1:7ffa8f3d30236e0ab897c30bdb01224ff1fe1c89</id>
<content type='text'>
The replacement, NTFS3, was merged over two years ago.  It is now time to
remove the original from the tree as it is the last user of several APIs,
and it is not worth changing.

Signed-off-by: Matthew Wilcox (Oracle) &lt;willy@infradead.org&gt;
Link: https://lore.kernel.org/r/20240115072025.2071931-1-willy@infradead.org
Acked-by: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Acked-by: Dave Chinner &lt;david@fromorbit.com&gt;
Cc: Anton Altaparmakov &lt;anton@tuxera.com&gt;
Cc: Namjae Jeon &lt;linkinjeon@kernel.org&gt;
Signed-off-by: Christian Brauner &lt;brauner@kernel.org&gt;
</content>
</entry>
<entry>
<title>treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 96</title>
<updated>2019-05-24T15:37:53+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2019-05-22T07:51:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.landau.one/pub/scm/linux/kernel/git/torvalds/linux-2.6.git/commit/?id=a1d312de7780edc972e7fc3dec913304412da11e'/>
<id>urn:sha1:a1d312de7780edc972e7fc3dec913304412da11e</id>
<content type='text'>
Based on 1 normalized pattern(s):

  this program include file is free software you can redistribute it
  and or modify it under the terms of the gnu general public license
  as published by the free software foundation either version 2 of the
  license or at your option any later version this program include
  file is distributed in the hope that it will be useful but without
  any warranty without even the implied warranty of merchantability or
  fitness for a particular purpose see the gnu general public license
  for more details you should have received a copy of the gnu general
  public license along with this program in the main directory of the
  linux [ntfs] distribution in the file copying if not write to the
  free software foundation inc 59 temple place suite 330 boston ma
  02111 1307 usa

extracted by the scancode license scanner the SPDX license identifier

  GPL-2.0-or-later

has been chosen to replace the boilerplate/reference in 43 file(s).

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Reviewed-by: Richard Fontana &lt;rfontana@redhat.com&gt;
Reviewed-by: Allison Randal &lt;allison@lohutok.net&gt;
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190520075212.517001706@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
