diff options
author | Jan Kara <jack@suse.cz> | 2022-10-05 18:48:45 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2023-01-09 10:39:51 +0100 |
commit | 9b06fbef4202363d74bba5459ddd231db6d3b1af (patch) | |
tree | 98f202d6031b6adf9edae10d5d65dbb2a9ac3986 /fs/udf | |
parent | udf: Convert udf_lookup() to use new directory iteration code (diff) | |
download | linux-9b06fbef4202363d74bba5459ddd231db6d3b1af.tar.xz linux-9b06fbef4202363d74bba5459ddd231db6d3b1af.zip |
udf: Convert udf_get_parent() to new directory iteration code
Convert udf_get_parent() to use udf_fiiter_find_entry().
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/udf')
-rw-r--r-- | fs/udf/namei.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/fs/udf/namei.c b/fs/udf/namei.c index efc75cf5722d..812786050617 100644 --- a/fs/udf/namei.c +++ b/fs/udf/namei.c @@ -1367,17 +1367,15 @@ static struct dentry *udf_get_parent(struct dentry *child) { struct kernel_lb_addr tloc; struct inode *inode = NULL; - struct fileIdentDesc cfi; - struct udf_fileident_bh fibh; - - if (!udf_find_entry(d_inode(child), &dotdot_name, &fibh, &cfi)) - return ERR_PTR(-EACCES); + struct udf_fileident_iter iter; + int err; - if (fibh.sbh != fibh.ebh) - brelse(fibh.ebh); - brelse(fibh.sbh); + err = udf_fiiter_find_entry(d_inode(child), &dotdot_name, &iter); + if (err) + return ERR_PTR(err); - tloc = lelb_to_cpu(cfi.icb.extLocation); + tloc = lelb_to_cpu(iter.fi.icb.extLocation); + udf_fiiter_release(&iter); inode = udf_iget(child->d_sb, &tloc); if (IS_ERR(inode)) return ERR_CAST(inode); |