]> git.baikalelectronics.ru Git - kernel.git/commit
hfsplus: add missing extent locking in hfsplus_write_inode
authorChristoph Hellwig <hch@tuxera.com>
Fri, 1 Oct 2010 03:46:31 +0000 (05:46 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 1 Oct 2010 03:46:31 +0000 (05:46 +0200)
commit3410876f747a20ccbc48df86b3548e43cef0b74c
treeb07045981f17d855f89f1ef59579e330d8ffce20
parent777e199edebc4f1670273657ade045563af2f5a7
hfsplus: add missing extent locking in hfsplus_write_inode

Most of the extent handling code already does proper SMP locking, but
hfsplus_write_inode was calling into hfsplus_ext_write_extent without
taking the extents_lock.  Fix this by splitting hfsplus_ext_write_extent
into an internal helper that expects the lock, and a public interface
that first acquires it.

Also add a few locking asserts and document the locking rules in
hfsplus_fs.h.

Signed-off-by: Christoph Hellwig <hch@tuxera.com>
fs/hfsplus/extents.c
fs/hfsplus/hfsplus_fs.h