From: Christian Brauner Date: Wed, 22 Apr 2026 13:00:32 +0000 (+0200) Subject: Merge patch series "assorted ->i_count changes + extension of lockless handling" X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62c251278f3bdaed72ddf980113bd8065475061f;p=thirdparty%2Fkernel%2Flinux.git Merge patch series "assorted ->i_count changes + extension of lockless handling" Mateusz Guzik says: The stock kernel support partial lockless in handling in that iput() can decrement any value > 1. Any ref acquire however requires the spinlock. With this patchset ref acquires when the value was already at least 1 also become lockless. That is, only transitions 0->1 and 1->0 take the lock. I verified when nfs calls into the hash taking the lock is typically avoided. Similarly, btrfs likes to igrab() and avoids the lock. However, I have to fully admit I did not perform any benchmarks. While cleaning stuff up I noticed lockless operation is almost readily available so I went for it. Clean-up wise, the icount_read_once() stuff lines up with inode_state_read_once(). The prefix is different but I opted to not change it due to igrab(), ihold() et al. * patches from https://patch.msgid.link/20260421182538.1215894-1-mjguzik@gmail.com: fs: allow lockless ->i_count bumps as long as it does not transition 0->1 fs: relocate and tidy up ihold() fs: add icount_read_once() and stop open-coding ->i_count loads Link: https://patch.msgid.link/20260421182538.1215894-1-mjguzik@gmail.com Signed-off-by: Christian Brauner --- 62c251278f3bdaed72ddf980113bd8065475061f