Skip to content

Commit

Permalink
fs/udf: make #ifdef UDF_PREALLOCATE unconditional
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Kenton <[email protected]>
Signed-off-by: Jan Kara <[email protected]>
  • Loading branch information
Steve Kenton authored and jankara committed Jan 3, 2017
1 parent 88b50ce commit a17f0cb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 3 deletions.
2 changes: 0 additions & 2 deletions fs/udf/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -857,14 +857,12 @@ static sector_t inode_getblk(struct inode *inode, sector_t block,
* block */
udf_split_extents(inode, &c, offset, newblocknum, laarr, &endnum);

#ifdef UDF_PREALLOCATE
/* We preallocate blocks only for regular files. It also makes sense
* for directories but there's a problem when to drop the
* preallocation. We might use some delayed work for that but I feel
* it's overengineering for a filesystem like UDF. */
if (S_ISREG(inode->i_mode))
udf_prealloc_extents(inode, c, lastblock, laarr, &endnum);
#endif

/* merge any continuous blocks in laarr */
udf_merge_extents(inode, laarr, &endnum);
Expand Down
1 change: 0 additions & 1 deletion fs/udf/udfdecl.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#include "udfend.h"
#include "udf_i.h"

#define UDF_PREALLOCATE
#define UDF_DEFAULT_PREALLOC_BLOCKS 8

extern __printf(3, 4) void _udf_err(struct super_block *sb,
Expand Down

0 comments on commit a17f0cb

Please sign in to comment.