summaryrefslogtreecommitdiffstats
path: root/fs/udf/directory.c
diff options
context:
space:
mode:
authorJan Kara <jack@suse.cz>2018-06-13 17:30:14 +0200
committerJan Kara <jack@suse.cz>2018-06-20 11:05:49 +0200
commitf2e83347119acc0412941c5a23d895624c9300e2 (patch)
tree7c57d33e7bc50b49fff6c5edc73a8992bfae83ff /fs/udf/directory.c
parentfa65653e575fbd958bdf5fb9c4a71a324e39510d (diff)
downloadlinux-stable-f2e83347119acc0412941c5a23d895624c9300e2.tar.gz
linux-stable-f2e83347119acc0412941c5a23d895624c9300e2.tar.bz2
linux-stable-f2e83347119acc0412941c5a23d895624c9300e2.zip
udf: Provide function for calculating dir entry length
Provide function for calculating directory entry length and use to reduce code duplication. Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf/directory.c')
-rw-r--r--fs/udf/directory.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/fs/udf/directory.c b/fs/udf/directory.c
index 3835f983cc99..d9523013096f 100644
--- a/fs/udf/directory.c
+++ b/fs/udf/directory.c
@@ -141,10 +141,7 @@ struct fileIdentDesc *udf_fileident_read(struct inode *dir, loff_t *nf_pos,
fibh->ebh->b_data,
sizeof(struct fileIdentDesc) + fibh->soffset);
- fi_len = (sizeof(struct fileIdentDesc) +
- cfi->lengthFileIdent +
- le16_to_cpu(cfi->lengthOfImpUse) + 3) & ~3;
-
+ fi_len = udf_dir_entry_len(cfi);
*nf_pos += fi_len - (fibh->eoffset - fibh->soffset);
fibh->eoffset = fibh->soffset + fi_len;
} else {