]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commit
ocfs2: Wrap access of directory allocations with ip_alloc_sem.
authorJoel Becker <joel.becker@oracle.com>
Thu, 29 Mar 2007 01:27:07 +0000 (18:27 -0700)
committerMark Fasheh <mark.fasheh@oracle.com>
Wed, 2 May 2007 22:07:42 +0000 (15:07 -0700)
commitee19a77956cb65c5da54d85a5efefe50b39fa6e5
tree1ce4410333f2ad72460cb742d3f5974acb6f9caa
parent6cb129f5675c39944e5fe18fd2530a2eb771b754
ocfs2: Wrap access of directory allocations with ip_alloc_sem.

OCFS2_I(inode)->ip_alloc_sem is a read-write semaphore protecting
local concurrent access of ocfs2 inodes.  However, ocfs2 directories were
not taking the semaphore while they accessed or modified the allocation
tree.

ocfs2_extend_dir() needs to take the semaphore in a write mode when it
adds to the allocation.  All other directory users get there via
ocfs2_bread(), which takes the semaphore in read mode.

Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mark.fasheh@oracle.com>
fs/ocfs2/dir.c
fs/ocfs2/inode.c