[PATCH 0/4] btrfs: fix FMODE_NOCMTIME handling in btrfs

From: Jeff Layton

Date: Thu Nov 05 2026 - 15:28:01 EST


I tested the delegated timestamp support in nfsd recently. That support
relies heavily on FMODE_NOCMTIME, and I found several places where btrfs
didn't handle that flag properly. This series seems to fix them for me.
I tested mostly with the git regression testsuite, because it is very
sensitive to subtle bugs in timestamp handling.

Please consider for v7.5.

Signed-off-by: Jeff Layton <jlayton@xxxxxxxxxx>
---
Jeff Layton (4):
btrfs: honor FMODE_NOCMTIME in btrfs_write_check()
btrfs: honor FMODE_NOCMTIME when punching holes
btrfs: honor FMODE_NOCMTIME in fallocate
btrfs: honor FMODE_NOCMTIME when cloning

fs/btrfs/btrfs_inode.h | 3 ++-
fs/btrfs/ctree.h | 2 --
fs/btrfs/file.c | 60 +++++++++++++++++++++++++++++++++++---------------
fs/btrfs/file.h | 2 ++
fs/btrfs/inode.c | 13 ++++++-----
fs/btrfs/reflink.c | 9 ++++----
fs/btrfs/relocation.c | 2 +-
7 files changed, 59 insertions(+), 32 deletions(-)
---
base-commit: d692f252c52b8d1b4bc7481554f314df31ed8249
change-id: 20261104-delegts-btrfs-124230048ca7

Best regards,
--
Jeff Layton <jlayton@xxxxxxxxxx>