mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] hfs/hfsplus: don't take inode_lock in ->fsync()
@ 2026-11-13  0:37 Viacheslav Dubeyko
  2026-11-13  0:37 ` [PATCH 1/2] hfsplus: don't take inode_lock in hfsplus_file_fsync() Viacheslav Dubeyko
  2026-11-13  0:37 ` [PATCH 2/2] hfs: don't take inode_lock in hfs_file_fsync() Viacheslav Dubeyko
  0 siblings, 2 replies; 3+ messages in thread
From: Viacheslav Dubeyko @ 2026-11-13  0:37 UTC (permalink / raw)
  To: glaubitz, frank.li
  Cc: linux-fsdevel, linux-kernel, vdubeyko, Viacheslav Dubeyko

Both hfs_file_fsync() and hfsplus_file_fsync() take inode_lock()
around the metadata part of fsync. For both file systems
it is not needed: the inode's metadata is written by
the same ->write_inode() path that the flusher threads use
without inode_lock, the b-tree records are updated under the b-tree
locks, and the b-tree, bitmap and MDB/volume header flushes are
per-superblock and serialized by their own locks (mdb_lock in HFS,
vh_mutex/alloc_mutex in HFS+). The lock only holds off writers of the
file for the whole duration of the metadata and device cache flushes.

Drop inode_lock()/inode_unlock() from both ->fsync()
handlers. Patch 1 is for HFS+, patch 2 does the same for HFS.

Viacheslav Dubeyko (2):
  hfsplus: don't take inode_lock in hfsplus_file_fsync()
  hfs: don't take inode_lock in hfs_file_fsync()

 fs/hfs/inode.c     | 2 --
 fs/hfsplus/inode.c | 3 ---
 2 files changed, 5 deletions(-)

-- 
2.53.0


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

end of thread, other threads:[~2026-11-13  0:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-13  0:37 [PATCH 0/2] hfs/hfsplus: don't take inode_lock in ->fsync() Viacheslav Dubeyko
2026-11-13  0:37 ` [PATCH 1/2] hfsplus: don't take inode_lock in hfsplus_file_fsync() Viacheslav Dubeyko
2026-11-13  0:37 ` [PATCH 2/2] hfs: don't take inode_lock in hfs_file_fsync() Viacheslav Dubeyko

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

all inboxes | Powered by JetHome®