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
b85fd6bd
Commit
b85fd6bd
authored
Jul 17, 2011
by
Al Viro
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
don't open-code parent_ino() in assorted ->readdir()
Signed-off-by:
Al Viro
<
viro@zeniv.linux.org.uk
>
parent
2def9e4e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
fs/ceph/dir.c
fs/ceph/dir.c
+1
-1
fs/cifs/readdir.c
fs/cifs/readdir.c
+1
-1
fs/coda/dir.c
fs/coda/dir.c
+1
-1
No files found.
fs/ceph/dir.c
View file @
b85fd6bd
...
...
@@ -252,7 +252,7 @@ static int ceph_readdir(struct file *filp, void *dirent, filldir_t filldir)
off
=
1
;
}
if
(
filp
->
f_pos
==
1
)
{
ino_t
ino
=
filp
->
f_dentry
->
d_parent
->
d_inode
->
i_ino
;
ino_t
ino
=
parent_ino
(
filp
->
f_dentry
)
;
dout
(
"readdir off 1 -> '..'
\n
"
);
if
(
filldir
(
dirent
,
".."
,
2
,
ceph_make_fpos
(
0
,
1
),
ceph_translate_ino
(
inode
->
i_sb
,
ino
),
...
...
fs/cifs/readdir.c
View file @
b85fd6bd
...
...
@@ -796,7 +796,7 @@ int cifs_readdir(struct file *file, void *direntry, filldir_t filldir)
file
->
f_pos
++
;
case
1
:
if
(
filldir
(
direntry
,
".."
,
2
,
file
->
f_pos
,
file
->
f_path
.
dentry
->
d_parent
->
d_inode
->
i_ino
,
DT_DIR
)
<
0
)
{
parent_ino
(
file
->
f_path
.
dentry
)
,
DT_DIR
)
<
0
)
{
cERROR
(
1
,
"Filldir for parent dir failed"
);
rc
=
-
ENOMEM
;
break
;
...
...
fs/coda/dir.c
View file @
b85fd6bd
...
...
@@ -473,7 +473,7 @@ static int coda_venus_readdir(struct file *coda_file, void *buf,
coda_file
->
f_pos
++
;
}
if
(
coda_file
->
f_pos
==
1
)
{
ret
=
filldir
(
buf
,
".."
,
2
,
1
,
de
->
d_parent
->
d_inode
->
i_ino
,
DT_DIR
);
ret
=
filldir
(
buf
,
".."
,
2
,
1
,
parent_ino
(
de
)
,
DT_DIR
);
if
(
ret
<
0
)
goto
out
;
result
++
;
...
...
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