From e667b61b6f2404d3e9d2603e594f0b86325e653c Mon Sep 17 00:00:00 2001 From: alex Date: Thu, 1 Sep 2005 21:53:36 +0000 Subject: [PATCH] - add fo_alloc_lock serialization support for extents/mballoc case --- lustre/lvfs/fsfilt_ext3.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/lustre/lvfs/fsfilt_ext3.c b/lustre/lvfs/fsfilt_ext3.c index 6d23c7f..5132a17 100644 --- a/lustre/lvfs/fsfilt_ext3.c +++ b/lustre/lvfs/fsfilt_ext3.c @@ -1040,18 +1040,17 @@ int fsfilt_ext3_map_inode_pages(struct inode *inode, struct page **page, int *created, int create, struct semaphore *optional_sem) { - int rc; + int rc = 0; + if (optional_sem != NULL) + down(optional_sem); #ifdef EXT3_MULTIBLOCK_ALLOCATOR - if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) { + if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) rc = fsfilt_ext3_map_ext_inode_pages(inode, page, pages, blocks, created, create); - return rc; - } + else #endif - if (optional_sem != NULL) - down(optional_sem); - rc = fsfilt_ext3_map_bm_inode_pages(inode, page, pages, blocks, - created, create); + rc = fsfilt_ext3_map_bm_inode_pages(inode, page, pages, blocks, + created, create); if (optional_sem != NULL) up(optional_sem); -- 1.8.3.1