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
d5e9d67b
Commit
d5e9d67b
authored
Mar 12, 2002
by
Alexander Viro
Committed by
Linus Torvalds
Mar 12, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] (1/4) smarter nfs_get_sb()
Switch NFS to use of NFS_SB(sb) instead of sb->u.nfs_sb.s_server
parent
4630bcaf
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
fs/nfs/inode.c
fs/nfs/inode.c
+7
-7
include/linux/nfs_fs.h
include/linux/nfs_fs.h
+2
-1
No files found.
fs/nfs/inode.c
View file @
d5e9d67b
...
@@ -144,7 +144,7 @@ nfs_clear_inode(struct inode *inode)
...
@@ -144,7 +144,7 @@ nfs_clear_inode(struct inode *inode)
void
void
nfs_put_super
(
struct
super_block
*
sb
)
nfs_put_super
(
struct
super_block
*
sb
)
{
{
struct
nfs_server
*
server
=
&
sb
->
u
.
nfs_sb
.
s_server
;
struct
nfs_server
*
server
=
NFS_SB
(
sb
)
;
struct
rpc_clnt
*
rpc
;
struct
rpc_clnt
*
rpc
;
/*
/*
...
@@ -169,7 +169,7 @@ nfs_put_super(struct super_block *sb)
...
@@ -169,7 +169,7 @@ nfs_put_super(struct super_block *sb)
void
void
nfs_umount_begin
(
struct
super_block
*
sb
)
nfs_umount_begin
(
struct
super_block
*
sb
)
{
{
struct
nfs_server
*
server
=
&
sb
->
u
.
nfs_sb
.
s_server
;
struct
nfs_server
*
server
=
NFS_SB
(
sb
)
;
struct
rpc_clnt
*
rpc
;
struct
rpc_clnt
*
rpc
;
/* -EIO all pending I/O */
/* -EIO all pending I/O */
...
@@ -225,7 +225,7 @@ nfs_block_size(unsigned long bsize, unsigned char *nrbitsp)
...
@@ -225,7 +225,7 @@ nfs_block_size(unsigned long bsize, unsigned char *nrbitsp)
static
struct
inode
*
static
struct
inode
*
nfs_get_root
(
struct
super_block
*
sb
,
struct
nfs_fh
*
rootfh
)
nfs_get_root
(
struct
super_block
*
sb
,
struct
nfs_fh
*
rootfh
)
{
{
struct
nfs_server
*
server
=
&
sb
->
u
.
nfs_sb
.
s_server
;
struct
nfs_server
*
server
=
NFS_SB
(
sb
)
;
struct
nfs_fattr
fattr
;
struct
nfs_fattr
fattr
;
struct
inode
*
inode
;
struct
inode
*
inode
;
int
error
;
int
error
;
...
@@ -262,7 +262,7 @@ int nfs_fill_super(struct super_block *sb, void *raw_data, int silent)
...
@@ -262,7 +262,7 @@ int nfs_fill_super(struct super_block *sb, void *raw_data, int silent)
/* We probably want something more informative here */
/* We probably want something more informative here */
snprintf
(
sb
->
s_id
,
sizeof
(
sb
->
s_id
),
"%x:%x"
,
major
(
sb
->
s_dev
),
minor
(
sb
->
s_dev
));
snprintf
(
sb
->
s_id
,
sizeof
(
sb
->
s_id
),
"%x:%x"
,
major
(
sb
->
s_dev
),
minor
(
sb
->
s_dev
));
memset
(
&
sb
->
u
.
nfs_sb
,
0
,
sizeof
(
sb
->
u
.
nfs_sb
));
memset
(
NFS_SB
(
sb
),
0
,
sizeof
(
struct
nfs_sb_info
));
if
(
!
data
)
if
(
!
data
)
goto
out_miss_args
;
goto
out_miss_args
;
...
@@ -291,7 +291,7 @@ int nfs_fill_super(struct super_block *sb, void *raw_data, int silent)
...
@@ -291,7 +291,7 @@ int nfs_fill_super(struct super_block *sb, void *raw_data, int silent)
sb
->
s_op
=
&
nfs_sops
;
sb
->
s_op
=
&
nfs_sops
;
sb
->
s_blocksize_bits
=
0
;
sb
->
s_blocksize_bits
=
0
;
sb
->
s_blocksize
=
nfs_block_size
(
data
->
bsize
,
&
sb
->
s_blocksize_bits
);
sb
->
s_blocksize
=
nfs_block_size
(
data
->
bsize
,
&
sb
->
s_blocksize_bits
);
server
=
&
sb
->
u
.
nfs_sb
.
s_server
;
server
=
NFS_SB
(
sb
)
;
server
->
rsize
=
nfs_block_size
(
data
->
rsize
,
NULL
);
server
->
rsize
=
nfs_block_size
(
data
->
rsize
,
NULL
);
server
->
wsize
=
nfs_block_size
(
data
->
wsize
,
NULL
);
server
->
wsize
=
nfs_block_size
(
data
->
wsize
,
NULL
);
server
->
flags
=
data
->
flags
&
NFS_MOUNT_FLAGMASK
;
server
->
flags
=
data
->
flags
&
NFS_MOUNT_FLAGMASK
;
...
@@ -513,7 +513,7 @@ int nfs_fill_super(struct super_block *sb, void *raw_data, int silent)
...
@@ -513,7 +513,7 @@ int nfs_fill_super(struct super_block *sb, void *raw_data, int silent)
static
int
static
int
nfs_statfs
(
struct
super_block
*
sb
,
struct
statfs
*
buf
)
nfs_statfs
(
struct
super_block
*
sb
,
struct
statfs
*
buf
)
{
{
struct
nfs_server
*
server
=
&
sb
->
u
.
nfs_sb
.
s_server
;
struct
nfs_server
*
server
=
NFS_SB
(
sb
)
;
unsigned
char
blockbits
;
unsigned
char
blockbits
;
unsigned
long
blockres
;
unsigned
long
blockres
;
struct
nfs_fsinfo
res
;
struct
nfs_fsinfo
res
;
...
@@ -561,7 +561,7 @@ static int nfs_show_options(struct seq_file *m, struct vfsmount *mnt)
...
@@ -561,7 +561,7 @@ static int nfs_show_options(struct seq_file *m, struct vfsmount *mnt)
{
0
,
NULL
,
NULL
}
{
0
,
NULL
,
NULL
}
};
};
struct
proc_nfs_info
*
nfs_infop
;
struct
proc_nfs_info
*
nfs_infop
;
struct
nfs_server
*
nfss
=
&
mnt
->
mnt_sb
->
u
.
nfs_sb
.
s_server
;
struct
nfs_server
*
nfss
=
NFS_SB
(
mnt
->
mnt_sb
)
;
seq_printf
(
m
,
",v%d"
,
nfss
->
rpc_ops
->
version
);
seq_printf
(
m
,
",v%d"
,
nfss
->
rpc_ops
->
version
);
seq_printf
(
m
,
",rsize=%d"
,
nfss
->
rsize
);
seq_printf
(
m
,
",rsize=%d"
,
nfss
->
rsize
);
...
...
include/linux/nfs_fs.h
View file @
d5e9d67b
...
@@ -174,9 +174,10 @@ static inline struct nfs_inode *NFS_I(struct inode *inode)
...
@@ -174,9 +174,10 @@ static inline struct nfs_inode *NFS_I(struct inode *inode)
{
{
return
list_entry
(
inode
,
struct
nfs_inode
,
vfs_inode
);
return
list_entry
(
inode
,
struct
nfs_inode
,
vfs_inode
);
}
}
#define NFS_SB(s) (&s->u.nfs_sb.s_server)
#define NFS_FH(inode) (&NFS_I(inode)->fh)
#define NFS_FH(inode) (&NFS_I(inode)->fh)
#define NFS_SERVER(inode) (
&(inode)->i_sb->u.nfs_sb.s_server
)
#define NFS_SERVER(inode) (
NFS_SB(inode->i_sb)
)
#define NFS_CLIENT(inode) (NFS_SERVER(inode)->client)
#define NFS_CLIENT(inode) (NFS_SERVER(inode)->client)
#define NFS_PROTO(inode) (NFS_SERVER(inode)->rpc_ops)
#define NFS_PROTO(inode) (NFS_SERVER(inode)->rpc_ops)
#define NFS_REQUESTLIST(inode) (NFS_SERVER(inode)->rw_requests)
#define NFS_REQUESTLIST(inode) (NFS_SERVER(inode)->rw_requests)
...
...
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