diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/udf/namei.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/udf/namei.c b/fs/udf/namei.c index 47a6589e10b5..3d94bc1cfbaf 100644 --- a/fs/udf/namei.c +++ b/fs/udf/namei.c | |||
@@ -315,7 +315,7 @@ static struct fileIdentDesc *udf_add_entry(struct inode *dir, | |||
315 | uint16_t liu; | 315 | uint16_t liu; |
316 | int block; | 316 | int block; |
317 | kernel_lb_addr eloc; | 317 | kernel_lb_addr eloc; |
318 | uint32_t elen; | 318 | uint32_t elen = 0; |
319 | sector_t offset; | 319 | sector_t offset; |
320 | struct extent_position epos = {}; | 320 | struct extent_position epos = {}; |
321 | struct udf_inode_info *dinfo; | 321 | struct udf_inode_info *dinfo; |
@@ -406,7 +406,8 @@ static struct fileIdentDesc *udf_add_entry(struct inode *dir, | |||
406 | } | 406 | } |
407 | 407 | ||
408 | add: | 408 | add: |
409 | if (dinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB) { | 409 | /* Is there any extent whose size we need to round up? */ |
410 | if (dinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB && elen) { | ||
410 | elen = (elen + sb->s_blocksize - 1) & ~(sb->s_blocksize - 1); | 411 | elen = (elen + sb->s_blocksize - 1) & ~(sb->s_blocksize - 1); |
411 | if (dinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT) | 412 | if (dinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT) |
412 | epos.offset -= sizeof(short_ad); | 413 | epos.offset -= sizeof(short_ad); |