mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 10:31:46 +09:00
udf: Convert udf_get_parent() to new directory iteration code
[ Upstream commit 9b06fbef42 ]
Convert udf_get_parent() to use udf_fiiter_find_entry().
Signed-off-by: Jan Kara <jack@suse.cz>
Signed-off-by: Thadeu Lima de Souza Cascardo <cascardo@igalia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
0f7fd74594
commit
1e5f534121
@@ -1366,17 +1366,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;
|
||||
struct udf_fileident_iter iter;
|
||||
int err;
|
||||
|
||||
if (!udf_find_entry(d_inode(child), &dotdot_name, &fibh, &cfi))
|
||||
return ERR_PTR(-EACCES);
|
||||
err = udf_fiiter_find_entry(d_inode(child), &dotdot_name, &iter);
|
||||
if (err)
|
||||
return ERR_PTR(err);
|
||||
|
||||
if (fibh.sbh != fibh.ebh)
|
||||
brelse(fibh.ebh);
|
||||
brelse(fibh.sbh);
|
||||
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user