Linux CIFS filesystem development
 help / color / mirror / Atom feed
* [PATCH 00/11] netfs: Miscellaneous fixes
@ 2026-06-19 14:06 David Howells
  2026-06-19 14:06 ` [PATCH 01/11] netfs: Fix decision whether to disallow write-streaming due to fscache use David Howells
                   ` (10 more replies)
  0 siblings, 11 replies; 12+ messages in thread
From: David Howells @ 2026-06-19 14:06 UTC (permalink / raw)
  To: Christian Brauner
  Cc: David Howells, Paulo Alcantara, netfs, linux-afs, linux-cifs,
	ceph-devel, linux-fsdevel, linux-kernel

Hi Christian,

Here are some miscellaneous fixes for netfslib.  I separated them from my
netfs-next branch.  Various Sashiko review comments[1][2] are addressed:

 (1) Fix the decision whether to disallow write-streaming due to fscache
     use.

 (2) Fix a double fput in cachefiles_create_tmpfile().

 (3) Fix alteration of S_KERNEL_FILE inode flag without holding inode lock.

 (4) Fix a potential mathematical underflow in
     iov_iter_extract_xarray_pages() and make it return 0 and free the
     array if no pages could be extracted.

 (5) Fix a missing alloc failure check in iov_iter_extract_bvec_pages().

 (6) Fix iov_iter_extract_user_pages() so that it doesn't leak the pages
     array if it returns an error or 0 (inasmuch as the leak is really in
     the callers).

 (7) Remove an unused variable in kunit_iov_iter.c.

 (8) Fix extract_xarray_to_sg() to calculate folio offset correctly.

 (9) Fix a kdoc comment.

(10) Replace the netfs_inode::wb_lock mutex with a bit lock so that the
     lock can be passed to the collector so that multiple asynchronous
     writebacks won't interfere with each other.

The patches can also be found here:

	https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=netfs-fixes

Thanks,
David

[1] https://sashiko.dev/#/patchset/20260608145432.681865-1-dhowells%40redhat.com
[2] https://sashiko.dev/#/patchset/20260616100821.2062304-1-dhowells%40redhat.com

Changes
=======
ver #1)
- Added a fix for S_KERNEL_FILE in cachefiles_bury_object().
- Fixed how iov_iter_extract_*_pages() deals with *pages when returning 0
  or error.
- Fixed the replacement of wb_lock with bit lock:
  - Only release the bit lock for writeback, writethrough and write-single,
    not for PG_private_2-based I/O, which doesn't take the lock.
  - In netfs_writeback_single(), need to redirty the inode if can't get the
    lock.

David Howells (11):
  netfs: Fix decision whether to disallow write-streaming due to fscache
    use
  cachefiles: Fix double fput
  cachefiles: Fix file burial to take lock when unsetting S_KERNEL_FILE
  iov_iter: Fix potential underflow in iov_iter_extract_xarray_pages()
  iov_iter: Fix missing alloc fail check in
    iov_iter_extract_bvec_pages()
  iov_iter: Fix a memory leak in iov_iter_extract_user_pages()
  iov_iter: Remove unused variable in kunit_iov_iter.c
  scatterlist: Fix offset in folio calc in extract_xarray_to_sg()
  netfs: Fix kdoc warning
  netfs: Replace wb_lock with a bit lock for asynchronicity
  netfs: Fix writethrough to use collection offload

 fs/afs/symlink.c           |  4 +-
 fs/cachefiles/namei.c      |  3 +-
 fs/netfs/buffered_write.c  |  2 +-
 fs/netfs/internal.h        | 12 +++++
 fs/netfs/locking.c         | 95 ++++++++++++++++++++++++++++++++++++++
 fs/netfs/write_collect.c   | 10 ++++
 fs/netfs/write_issue.c     | 38 +++++----------
 include/linux/netfs.h      | 13 ++++--
 lib/iov_iter.c             | 20 +++++++-
 lib/scatterlist.c          |  1 +
 lib/tests/kunit_iov_iter.c |  5 +-
 11 files changed, 164 insertions(+), 39 deletions(-)


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2026-06-19 14:07 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-19 14:06 [PATCH 00/11] netfs: Miscellaneous fixes David Howells
2026-06-19 14:06 ` [PATCH 01/11] netfs: Fix decision whether to disallow write-streaming due to fscache use David Howells
2026-06-19 14:06 ` [PATCH 02/11] cachefiles: Fix double fput David Howells
2026-06-19 14:06 ` [PATCH 03/11] cachefiles: Fix file burial to take lock when unsetting S_KERNEL_FILE David Howells
2026-06-19 14:06 ` [PATCH 04/11] iov_iter: Fix potential underflow in iov_iter_extract_xarray_pages() David Howells
2026-06-19 14:06 ` [PATCH 05/11] iov_iter: Fix missing alloc fail check in iov_iter_extract_bvec_pages() David Howells
2026-06-19 14:06 ` [PATCH 06/11] iov_iter: Fix a memory leak in iov_iter_extract_user_pages() David Howells
2026-06-19 14:06 ` [PATCH 07/11] iov_iter: Remove unused variable in kunit_iov_iter.c David Howells
2026-06-19 14:06 ` [PATCH 08/11] scatterlist: Fix offset in folio calc in extract_xarray_to_sg() David Howells
2026-06-19 14:06 ` [PATCH 09/11] netfs: Fix kdoc warning David Howells
2026-06-19 14:06 ` [PATCH 10/11] netfs: Replace wb_lock with a bit lock for asynchronicity David Howells
2026-06-19 14:06 ` [PATCH 11/11] netfs: Fix writethrough to use collection offload David Howells

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox