From ca10e060559faf5f5abd6416cf8cb5cdabfebc2f Mon Sep 17 00:00:00 2001 From: Jan Kara Date: Tue, 6 May 2008 18:26:17 +0200 Subject: [PATCH] --- yaml --- r: 96154 b: refs/heads/master c: 9afadc4b1fd25337003832c9a4668f9bd42cdda9 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/udf/namei.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index fac8ec011b9b..86491471b1e2 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 221e583a735fc5d879d83c2a76b8ee5afcbdf146 +refs/heads/master: 9afadc4b1fd25337003832c9a4668f9bd42cdda9 diff --git a/trunk/fs/udf/namei.c b/trunk/fs/udf/namei.c index 47a6589e10b5..3d94bc1cfbaf 100644 --- a/trunk/fs/udf/namei.c +++ b/trunk/fs/udf/namei.c @@ -315,7 +315,7 @@ static struct fileIdentDesc *udf_add_entry(struct inode *dir, uint16_t liu; int block; kernel_lb_addr eloc; - uint32_t elen; + uint32_t elen = 0; sector_t offset; struct extent_position epos = {}; struct udf_inode_info *dinfo; @@ -406,7 +406,8 @@ static struct fileIdentDesc *udf_add_entry(struct inode *dir, } add: - if (dinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB) { + /* Is there any extent whose size we need to round up? */ + if (dinfo->i_alloc_type != ICBTAG_FLAG_AD_IN_ICB && elen) { elen = (elen + sb->s_blocksize - 1) & ~(sb->s_blocksize - 1); if (dinfo->i_alloc_type == ICBTAG_FLAG_AD_SHORT) epos.offset -= sizeof(short_ad);