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
nexedi
linux
Commits
33e09f0e
Commit
33e09f0e
authored
Oct 08, 2016
by
Al Viro
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'work.iget' into work.misc
parents
c5317167
2864f301
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
7 deletions
+34
-7
fs/inode.c
fs/inode.c
+34
-7
No files found.
fs/inode.c
View file @
33e09f0e
...
...
@@ -1021,13 +1021,17 @@ struct inode *iget5_locked(struct super_block *sb, unsigned long hashval,
{
struct
hlist_head
*
head
=
inode_hashtable
+
hash
(
sb
,
hashval
);
struct
inode
*
inode
;
again:
spin_lock
(
&
inode_hash_lock
);
inode
=
find_inode
(
sb
,
head
,
test
,
data
);
spin_unlock
(
&
inode_hash_lock
);
if
(
inode
)
{
wait_on_inode
(
inode
);
if
(
unlikely
(
inode_unhashed
(
inode
)))
{
iput
(
inode
);
goto
again
;
}
return
inode
;
}
...
...
@@ -1064,6 +1068,10 @@ struct inode *iget5_locked(struct super_block *sb, unsigned long hashval,
destroy_inode
(
inode
);
inode
=
old
;
wait_on_inode
(
inode
);
if
(
unlikely
(
inode_unhashed
(
inode
)))
{
iput
(
inode
);
goto
again
;
}
}
return
inode
;
...
...
@@ -1091,12 +1099,16 @@ struct inode *iget_locked(struct super_block *sb, unsigned long ino)
{
struct
hlist_head
*
head
=
inode_hashtable
+
hash
(
sb
,
ino
);
struct
inode
*
inode
;
again:
spin_lock
(
&
inode_hash_lock
);
inode
=
find_inode_fast
(
sb
,
head
,
ino
);
spin_unlock
(
&
inode_hash_lock
);
if
(
inode
)
{
wait_on_inode
(
inode
);
if
(
unlikely
(
inode_unhashed
(
inode
)))
{
iput
(
inode
);
goto
again
;
}
return
inode
;
}
...
...
@@ -1131,6 +1143,10 @@ struct inode *iget_locked(struct super_block *sb, unsigned long ino)
destroy_inode
(
inode
);
inode
=
old
;
wait_on_inode
(
inode
);
if
(
unlikely
(
inode_unhashed
(
inode
)))
{
iput
(
inode
);
goto
again
;
}
}
return
inode
;
}
...
...
@@ -1266,10 +1282,16 @@ EXPORT_SYMBOL(ilookup5_nowait);
struct
inode
*
ilookup5
(
struct
super_block
*
sb
,
unsigned
long
hashval
,
int
(
*
test
)(
struct
inode
*
,
void
*
),
void
*
data
)
{
struct
inode
*
inode
=
ilookup5_nowait
(
sb
,
hashval
,
test
,
data
);
if
(
inode
)
struct
inode
*
inode
;
again:
inode
=
ilookup5_nowait
(
sb
,
hashval
,
test
,
data
);
if
(
inode
)
{
wait_on_inode
(
inode
);
if
(
unlikely
(
inode_unhashed
(
inode
)))
{
iput
(
inode
);
goto
again
;
}
}
return
inode
;
}
EXPORT_SYMBOL
(
ilookup5
);
...
...
@@ -1286,13 +1308,18 @@ struct inode *ilookup(struct super_block *sb, unsigned long ino)
{
struct
hlist_head
*
head
=
inode_hashtable
+
hash
(
sb
,
ino
);
struct
inode
*
inode
;
again:
spin_lock
(
&
inode_hash_lock
);
inode
=
find_inode_fast
(
sb
,
head
,
ino
);
spin_unlock
(
&
inode_hash_lock
);
if
(
inode
)
if
(
inode
)
{
wait_on_inode
(
inode
);
if
(
unlikely
(
inode_unhashed
(
inode
)))
{
iput
(
inode
);
goto
again
;
}
}
return
inode
;
}
EXPORT_SYMBOL
(
ilookup
);
...
...
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