Commit 9b06fbef authored by Jan Kara's avatar Jan Kara

udf: Convert udf_get_parent() to new directory iteration code

Convert udf_get_parent() to use udf_fiiter_find_entry().
Signed-off-by: default avatarJan Kara <jack@suse.cz>
parent 200918b3
...@@ -1367,17 +1367,15 @@ static struct dentry *udf_get_parent(struct dentry *child) ...@@ -1367,17 +1367,15 @@ static struct dentry *udf_get_parent(struct dentry *child)
{ {
struct kernel_lb_addr tloc; struct kernel_lb_addr tloc;
struct inode *inode = NULL; struct inode *inode = NULL;
struct fileIdentDesc cfi; struct udf_fileident_iter iter;
struct udf_fileident_bh fibh; int err;
if (!udf_find_entry(d_inode(child), &dotdot_name, &fibh, &cfi))
return ERR_PTR(-EACCES);
if (fibh.sbh != fibh.ebh) err = udf_fiiter_find_entry(d_inode(child), &dotdot_name, &iter);
brelse(fibh.ebh); if (err)
brelse(fibh.sbh); 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); inode = udf_iget(child->d_sb, &tloc);
if (IS_ERR(inode)) if (IS_ERR(inode))
return ERR_CAST(inode); return ERR_CAST(inode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment