From: adilger Date: Mon, 7 Mar 2005 18:56:32 +0000 (+0000) Subject: Branch: b1_4 X-Git-Tag: v1_8_0_110~486^7~142 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=33475649e8aca0471d61331fc76f34d713ee57d7;p=fs%2Flustre-release.git Branch: b1_4 Don't try to block map an extent-mapped file if kernel doesn't support extents, return error instead. --- diff --git a/lustre/lvfs/fsfilt_ext3.c b/lustre/lvfs/fsfilt_ext3.c index 4606e25..080d3ad 100644 --- a/lustre/lvfs/fsfilt_ext3.c +++ b/lustre/lvfs/fsfilt_ext3.c @@ -952,13 +952,16 @@ int fsfilt_ext3_map_inode_pages(struct inode *inode, struct page **page, struct semaphore *optional_sem) { int rc; -#ifdef EXT3_MULTIBLOCK_ALLOCATOR if (EXT3_I(inode)->i_flags & EXT3_EXTENTS_FL) { +#ifdef EXT3_MULTIBLOCK_ALLOCATOR rc = fsfilt_ext3_map_ext_inode_pages(inode, page, pages, blocks, created, create); +#else + CERROR("extent-mapped file with unsupported kernel\n"); + rc = -EIO; +#endif return rc; } -#endif if (optional_sem != NULL) down(optional_sem); rc = fsfilt_ext3_map_bm_inode_pages(inode, page, pages, blocks,