提交 a17f0cb5 编写于 作者: S Steve Kenton 提交者: Jan Kara

fs/udf: make #ifdef UDF_PREALLOCATE unconditional

Signed-off-by: NSteve Kenton <skenton@ou.edu>
Signed-off-by: NJan Kara <jack@suse.cz>
上级 88b50ce3
...@@ -857,14 +857,12 @@ static sector_t inode_getblk(struct inode *inode, sector_t block, ...@@ -857,14 +857,12 @@ static sector_t inode_getblk(struct inode *inode, sector_t block,
* block */ * block */
udf_split_extents(inode, &c, offset, newblocknum, laarr, &endnum); udf_split_extents(inode, &c, offset, newblocknum, laarr, &endnum);
#ifdef UDF_PREALLOCATE
/* We preallocate blocks only for regular files. It also makes sense /* We preallocate blocks only for regular files. It also makes sense
* for directories but there's a problem when to drop the * for directories but there's a problem when to drop the
* preallocation. We might use some delayed work for that but I feel * preallocation. We might use some delayed work for that but I feel
* it's overengineering for a filesystem like UDF. */ * it's overengineering for a filesystem like UDF. */
if (S_ISREG(inode->i_mode)) if (S_ISREG(inode->i_mode))
udf_prealloc_extents(inode, c, lastblock, laarr, &endnum); udf_prealloc_extents(inode, c, lastblock, laarr, &endnum);
#endif
/* merge any continuous blocks in laarr */ /* merge any continuous blocks in laarr */
udf_merge_extents(inode, laarr, &endnum); udf_merge_extents(inode, laarr, &endnum);
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
#include "udfend.h" #include "udfend.h"
#include "udf_i.h" #include "udf_i.h"
#define UDF_PREALLOCATE
#define UDF_DEFAULT_PREALLOC_BLOCKS 8 #define UDF_DEFAULT_PREALLOC_BLOCKS 8
extern __printf(3, 4) void _udf_err(struct super_block *sb, extern __printf(3, 4) void _udf_err(struct super_block *sb,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册