Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 91827
b: refs/heads/master
c: 9bf2c6b
h: refs/heads/master
i:
  91825: 25990a2
  91823: 0e1ace2
v: v3
  • Loading branch information
Jan Kara committed Apr 17, 2008
1 parent b6ec7c0 commit 09c9f7e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 38 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 200a3592cda7bfc010d30c0b1eb8eff3791e9ba9
refs/heads/master: 9bf2c6b834f4caad82b3e2d962c266153d39e411
38 changes: 1 addition & 37 deletions trunk/fs/udf/namei.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,11 +303,9 @@ static struct fileIdentDesc *udf_add_entry(struct inode *dir,
{
struct super_block *sb = dir->i_sb;
struct fileIdentDesc *fi = NULL;
char name[UDF_NAME_LEN], fname[UDF_NAME_LEN];
char name[UDF_NAME_LEN];
int namelen;
loff_t f_pos;
int flen;
char *nameptr;
loff_t size = udf_ext0_offset(dir) + dir->i_size;
int nfidlen;
uint8_t lfi;
Expand Down Expand Up @@ -385,26 +383,6 @@ static struct fileIdentDesc *udf_add_entry(struct inode *dir,
liu = le16_to_cpu(cfi->lengthOfImpUse);
lfi = cfi->lengthFileIdent;

if (fibh->sbh == fibh->ebh)
nameptr = fi->fileIdent + liu;
else {
int poffset; /* Unpaded ending offset */

poffset = fibh->soffset + sizeof(struct fileIdentDesc) +
liu + lfi;

if (poffset >= lfi)
nameptr = (char *)(fibh->ebh->b_data +
poffset - lfi);
else {
nameptr = fname;
memcpy(nameptr, fi->fileIdent + liu,
lfi - poffset);
memcpy(nameptr + lfi - poffset,
fibh->ebh->b_data, poffset);
}
}

if ((cfi->fileCharacteristics & FID_FILE_CHAR_DELETED) != 0) {
if (((sizeof(struct fileIdentDesc) +
liu + lfi + 3) & ~3) == nfidlen) {
Expand All @@ -423,20 +401,6 @@ static struct fileIdentDesc *udf_add_entry(struct inode *dir,
}
}
}

if (!lfi || !dentry)
continue;

flen = udf_get_filename(dir->i_sb, nameptr, fname, lfi);
if (flen && udf_match(flen, fname, dentry->d_name.len,
dentry->d_name.name)) {
if (fibh->sbh != fibh->ebh)
brelse(fibh->ebh);
brelse(fibh->sbh);
brelse(epos.bh);
*err = -EEXIST;
return NULL;
}
}

add:
Expand Down

0 comments on commit 09c9f7e

Please sign in to comment.