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
9bb4ebc6
Commit
9bb4ebc6
authored
Sep 12, 2002
by
Neil Brown
Committed by
David S. Miller
Sep 12, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] kNFSd 10: Discard ex_dev and ex_ino from svc_export
They can be deduced from ex_dentry
parent
d42f5634
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
16 deletions
+14
-16
fs/nfsd/export.c
fs/nfsd/export.c
+7
-9
fs/nfsd/nfsfh.c
fs/nfsd/nfsfh.c
+7
-5
include/linux/nfsd/export.h
include/linux/nfsd/export.h
+0
-2
No files found.
fs/nfsd/export.c
View file @
9bb4ebc6
...
...
@@ -70,15 +70,17 @@ static svc_client * clients;
svc_export
*
exp_get
(
svc_client
*
clp
,
dev_t
dev
,
ino_t
ino
)
{
struct
list_head
*
head
,
*
p
;
struct
list_head
*
head
;
svc_export
*
exp
;
if
(
!
clp
)
return
NULL
;
head
=
&
clp
->
cl_export
[
EXPORT_HASH
(
dev
)];
list_for_each
(
p
,
head
)
{
svc_export
*
exp
=
list_entry
(
p
,
svc_export
,
ex_hash
);
if
(
exp
->
ex_ino
==
ino
&&
exp
->
ex_dev
==
dev
)
list_for_each_entry
(
exp
,
head
,
ex_hash
)
{
struct
inode
*
inode
=
exp
->
ex_dentry
->
d_inode
;
if
(
inode
->
i_ino
==
ino
&&
inode
->
i_sb
->
s_dev
==
dev
)
return
exp
;
}
return
NULL
;
...
...
@@ -338,8 +340,6 @@ exp_export(struct nfsctl_export *nxp)
exp
->
ex_mnt
=
mntget
(
nd
.
mnt
);
exp
->
ex_dentry
=
dget
(
nd
.
dentry
);
exp
->
ex_flags
=
nxp
->
ex_flags
;
exp
->
ex_dev
=
dev
;
exp
->
ex_ino
=
ino
;
exp
->
ex_anon_uid
=
nxp
->
ex_anon_uid
;
exp
->
ex_anon_gid
=
nxp
->
ex_anon_gid
;
exp
->
ex_fsid
=
nxp
->
ex_dev
;
...
...
@@ -376,8 +376,6 @@ exp_do_unexport(svc_export *unexp)
dentry
=
unexp
->
ex_dentry
;
mnt
=
unexp
->
ex_mnt
;
inode
=
dentry
->
d_inode
;
if
(
unexp
->
ex_dev
!=
inode
->
i_sb
->
s_dev
||
unexp
->
ex_ino
!=
inode
->
i_ino
)
printk
(
KERN_WARNING
"nfsd: bad dentry in unexport!
\n
"
);
dput
(
dentry
);
mntput
(
mnt
);
...
...
fs/nfsd/nfsfh.c
View file @
9bb4ebc6
...
...
@@ -322,9 +322,11 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry, st
struct
inode
*
inode
=
dentry
->
d_inode
;
struct
dentry
*
parent
=
dentry
->
d_parent
;
__u32
*
datap
;
dev_t
ex_dev
=
exp
->
ex_dentry
->
d_inode
->
i_sb
->
s_dev
;
dprintk
(
"nfsd: fh_compose(exp %02x:%02x/%ld %s/%s, ino=%ld)
\n
"
,
MAJOR
(
exp
->
ex_dev
),
MINOR
(
exp
->
ex_dev
),
(
long
)
exp
->
ex_ino
,
MAJOR
(
ex_dev
),
MINOR
(
ex_dev
),
(
long
)
exp
->
ex_dentry
->
d_inode
->
i_ino
,
parent
->
d_name
.
name
,
dentry
->
d_name
.
name
,
(
inode
?
inode
->
i_ino
:
0
));
...
...
@@ -351,9 +353,9 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry, st
memset
(
&
fhp
->
fh_handle
.
fh_base
,
0
,
NFS_FHSIZE
);
fhp
->
fh_handle
.
fh_size
=
NFS_FHSIZE
;
fhp
->
fh_handle
.
ofh_dcookie
=
0xfeebbaca
;
fhp
->
fh_handle
.
ofh_dev
=
htonl
((
MAJOR
(
ex
p
->
ex_dev
)
<<
16
)
|
MINOR
(
exp
->
ex_dev
));
fhp
->
fh_handle
.
ofh_dev
=
htonl
((
MAJOR
(
ex
_dev
)
<<
16
)
|
MINOR
(
ex_dev
));
fhp
->
fh_handle
.
ofh_xdev
=
fhp
->
fh_handle
.
ofh_dev
;
fhp
->
fh_handle
.
ofh_xino
=
ino_t_to_u32
(
exp
->
ex_ino
);
fhp
->
fh_handle
.
ofh_xino
=
ino_t_to_u32
(
exp
->
ex_
dentry
->
d_inode
->
i_
ino
);
fhp
->
fh_handle
.
ofh_dirino
=
ino_t_to_u32
(
parent_ino
(
dentry
));
if
(
inode
)
_fh_update_old
(
dentry
,
exp
,
&
fhp
->
fh_handle
);
...
...
@@ -370,8 +372,8 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry, st
}
else
{
fhp
->
fh_handle
.
fh_fsid_type
=
0
;
/* fsid_type 0 == 2byte major, 2byte minor, 4byte inode */
*
datap
++
=
htonl
((
MAJOR
(
ex
p
->
ex_dev
)
<<
16
)
|
MINOR
(
exp
->
ex_dev
));
*
datap
++
=
ino_t_to_u32
(
exp
->
ex_ino
);
*
datap
++
=
htonl
((
MAJOR
(
ex
_dev
)
<<
16
)
|
MINOR
(
ex_dev
));
*
datap
++
=
ino_t_to_u32
(
exp
->
ex_
dentry
->
d_inode
->
i_
ino
);
fhp
->
fh_handle
.
fh_size
=
3
*
4
;
}
if
(
inode
)
{
...
...
include/linux/nfsd/export.h
View file @
9bb4ebc6
...
...
@@ -64,8 +64,6 @@ struct svc_export {
int
ex_flags
;
struct
vfsmount
*
ex_mnt
;
struct
dentry
*
ex_dentry
;
dev_t
ex_dev
;
ino_t
ex_ino
;
uid_t
ex_anon_uid
;
gid_t
ex_anon_gid
;
int
ex_fsid
;
...
...
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