From: Dave Chinner Date: Wed, 12 Jan 2011 00:37:10 +0000 (+1100) Subject: xfs: introduce xfs_rw_lock() helpers for locking the inode X-Git-Tag: v2.6.38-rc1~44^2~10 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=487f84f3f80bc6f00c59725e822653d3ec174b85;p=pandora-kernel.git xfs: introduce xfs_rw_lock() helpers for locking the inode We need to obtain the i_mutex, i_iolock and i_ilock during the read and write paths. Add a set of wrapper functions to neatly encapsulate the lock ordering and shared/exclusive semantics to make the locking easier to follow and get right. Note that this changes some of the exclusive locking serialisation in that serialisation will occur against the i_mutex instead of the XFS_IOLOCK_EXCL. This does not change any behaviour, and it is arguably more efficient to use the mutex for such serialisation than the rw_sem. Signed-off-by: Dave Chinner Reviewed-by: Christoph Hellwig --- Reading git-diff-tree failed