Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
6b9cceea
Commit
6b9cceea
authored
Apr 30, 2018
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hfs: use d_splice_alias()
code is simpler that way Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
18fbbfc2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
15 deletions
+8
-15
fs/hfs/dir.c
fs/hfs/dir.c
+7
-13
fs/hfs/inode.c
fs/hfs/inode.c
+1
-2
No files found.
fs/hfs/dir.c
View file @
6b9cceea
...
@@ -31,21 +31,15 @@ static struct dentry *hfs_lookup(struct inode *dir, struct dentry *dentry,
...
@@ -31,21 +31,15 @@ static struct dentry *hfs_lookup(struct inode *dir, struct dentry *dentry,
hfs_cat_build_key
(
dir
->
i_sb
,
fd
.
search_key
,
dir
->
i_ino
,
&
dentry
->
d_name
);
hfs_cat_build_key
(
dir
->
i_sb
,
fd
.
search_key
,
dir
->
i_ino
,
&
dentry
->
d_name
);
res
=
hfs_brec_read
(
&
fd
,
&
rec
,
sizeof
(
rec
));
res
=
hfs_brec_read
(
&
fd
,
&
rec
,
sizeof
(
rec
));
if
(
res
)
{
if
(
res
)
{
hfs_find_exit
(
&
fd
);
if
(
res
!=
-
ENOENT
)
if
(
res
==
-
ENOENT
)
{
inode
=
ERR_PTR
(
res
);
/* No such entry */
}
else
{
inode
=
NULL
;
inode
=
hfs_iget
(
dir
->
i_sb
,
&
fd
.
search_key
->
cat
,
&
rec
);
goto
done
;
if
(
!
inode
)
}
inode
=
ERR_PTR
(
-
EACCES
);
return
ERR_PTR
(
res
);
}
}
inode
=
hfs_iget
(
dir
->
i_sb
,
&
fd
.
search_key
->
cat
,
&
rec
);
hfs_find_exit
(
&
fd
);
hfs_find_exit
(
&
fd
);
if
(
!
inode
)
return
d_splice_alias
(
inode
,
dentry
);
return
ERR_PTR
(
-
EACCES
);
done:
d_add
(
dentry
,
inode
);
return
NULL
;
}
}
/*
/*
...
...
fs/hfs/inode.c
View file @
6b9cceea
...
@@ -544,8 +544,7 @@ static struct dentry *hfs_file_lookup(struct inode *dir, struct dentry *dentry,
...
@@ -544,8 +544,7 @@ static struct dentry *hfs_file_lookup(struct inode *dir, struct dentry *dentry,
hlist_add_fake
(
&
inode
->
i_hash
);
hlist_add_fake
(
&
inode
->
i_hash
);
mark_inode_dirty
(
inode
);
mark_inode_dirty
(
inode
);
out:
out:
d_add
(
dentry
,
inode
);
return
d_splice_alias
(
inode
,
dentry
);
return
NULL
;
}
}
void
hfs_evict_inode
(
struct
inode
*
inode
)
void
hfs_evict_inode
(
struct
inode
*
inode
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment