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
9b7f1d7e
Commit
9b7f1d7e
authored
Feb 06, 2002
by
Alexander Viro
Committed by
Linus Torvalds
Feb 06, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PATCH] (2/6) more ->get_sb()
ncpfs.
parent
a4040581
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
15 deletions
+23
-15
fs/ncpfs/inode.c
fs/ncpfs/inode.c
+23
-14
include/linux/ncp_fs.h
include/linux/ncp_fs.h
+0
-1
No files found.
fs/ncpfs/inode.c
View file @
9b7f1d7e
...
@@ -300,8 +300,7 @@ ncp_delete_inode(struct inode *inode)
...
@@ -300,8 +300,7 @@ ncp_delete_inode(struct inode *inode)
clear_inode
(
inode
);
clear_inode
(
inode
);
}
}
struct
super_block
*
static
int
ncp_fill_super
(
struct
super_block
*
sb
,
void
*
raw_data
,
int
silent
)
ncp_read_super
(
struct
super_block
*
sb
,
void
*
raw_data
,
int
silent
)
{
{
struct
ncp_mount_data_kernel
data
;
struct
ncp_mount_data_kernel
data
;
struct
ncp_server
*
server
;
struct
ncp_server
*
server
;
...
@@ -434,7 +433,7 @@ ncp_read_super(struct super_block *sb, void *raw_data, int silent)
...
@@ -434,7 +433,7 @@ ncp_read_super(struct super_block *sb, void *raw_data, int silent)
ncp_unlock_server
(
server
);
ncp_unlock_server
(
server
);
if
(
error
<
0
)
if
(
error
<
0
)
goto
out_no_connect
;
goto
out_no_connect
;
DPRINTK
(
"ncp_
read
_super: NCP_SBP(sb) = %x
\n
"
,
(
int
)
NCP_SBP
(
sb
));
DPRINTK
(
"ncp_
fill
_super: NCP_SBP(sb) = %x
\n
"
,
(
int
)
NCP_SBP
(
sb
));
#ifdef CONFIG_NCPFS_PACKET_SIGNING
#ifdef CONFIG_NCPFS_PACKET_SIGNING
if
(
ncp_negotiate_size_and_options
(
server
,
default_bufsize
,
if
(
ncp_negotiate_size_and_options
(
server
,
default_bufsize
,
...
@@ -486,31 +485,31 @@ ncp_read_super(struct super_block *sb, void *raw_data, int silent)
...
@@ -486,31 +485,31 @@ ncp_read_super(struct super_block *sb, void *raw_data, int silent)
root_inode
=
ncp_iget
(
sb
,
&
finfo
);
root_inode
=
ncp_iget
(
sb
,
&
finfo
);
if
(
!
root_inode
)
if
(
!
root_inode
)
goto
out_no_root
;
goto
out_no_root
;
DPRINTK
(
"ncp_
read
_super: root vol=%d
\n
"
,
NCP_FINFO
(
root_inode
)
->
volNumber
);
DPRINTK
(
"ncp_
fill
_super: root vol=%d
\n
"
,
NCP_FINFO
(
root_inode
)
->
volNumber
);
sb
->
s_root
=
d_alloc_root
(
root_inode
);
sb
->
s_root
=
d_alloc_root
(
root_inode
);
if
(
!
sb
->
s_root
)
if
(
!
sb
->
s_root
)
goto
out_no_root
;
goto
out_no_root
;
sb
->
s_root
->
d_op
=
&
ncp_dentry_operations
;
sb
->
s_root
->
d_op
=
&
ncp_dentry_operations
;
return
sb
;
return
0
;
out_no_root:
out_no_root:
printk
(
KERN_ERR
"ncp_
read
_super: get root inode failed
\n
"
);
printk
(
KERN_ERR
"ncp_
fill
_super: get root inode failed
\n
"
);
iput
(
root_inode
);
iput
(
root_inode
);
goto
out_disconnect
;
goto
out_disconnect
;
out_no_bufsize:
out_no_bufsize:
printk
(
KERN_ERR
"ncp_
read
_super: could not get bufsize
\n
"
);
printk
(
KERN_ERR
"ncp_
fill
_super: could not get bufsize
\n
"
);
out_disconnect:
out_disconnect:
ncp_lock_server
(
server
);
ncp_lock_server
(
server
);
ncp_disconnect
(
server
);
ncp_disconnect
(
server
);
ncp_unlock_server
(
server
);
ncp_unlock_server
(
server
);
goto
out_free_packet
;
goto
out_free_packet
;
out_no_connect:
out_no_connect:
printk
(
KERN_ERR
"ncp_
read
_super: Failed connection, error=%d
\n
"
,
error
);
printk
(
KERN_ERR
"ncp_
fill
_super: Failed connection, error=%d
\n
"
,
error
);
out_free_packet:
out_free_packet:
vfree
(
server
->
packet
);
vfree
(
server
->
packet
);
goto
out_free_server
;
goto
out_free_server
;
out_no_packet:
out_no_packet:
printk
(
KERN_ERR
"ncp_
read
_super: could not alloc packet
\n
"
);
printk
(
KERN_ERR
"ncp_
fill
_super: could not alloc packet
\n
"
);
out_free_server:
out_free_server:
#ifdef CONFIG_NCPFS_NLS
#ifdef CONFIG_NCPFS_NLS
unload_nls
(
server
->
nls_io
);
unload_nls
(
server
->
nls_io
);
...
@@ -527,16 +526,16 @@ ncp_read_super(struct super_block *sb, void *raw_data, int silent)
...
@@ -527,16 +526,16 @@ ncp_read_super(struct super_block *sb, void *raw_data, int silent)
out_bad_file2:
out_bad_file2:
fput
(
ncp_filp
);
fput
(
ncp_filp
);
out_bad_file:
out_bad_file:
printk
(
KERN_ERR
"ncp_
read
_super: invalid ncp socket
\n
"
);
printk
(
KERN_ERR
"ncp_
fill
_super: invalid ncp socket
\n
"
);
goto
out
;
goto
out
;
out_bad_mount:
out_bad_mount:
printk
(
KERN_INFO
"ncp_
read
_super: kernel requires mount version %d
\n
"
,
printk
(
KERN_INFO
"ncp_
fill
_super: kernel requires mount version %d
\n
"
,
NCP_MOUNT_VERSION
);
NCP_MOUNT_VERSION
);
goto
out
;
goto
out
;
out_no_data:
out_no_data:
printk
(
KERN_ERR
"ncp_
read
_super: missing data argument
\n
"
);
printk
(
KERN_ERR
"ncp_
fill
_super: missing data argument
\n
"
);
out:
out:
return
NUL
L
;
return
-
EINVA
L
;
}
}
static
void
ncp_put_super
(
struct
super_block
*
sb
)
static
void
ncp_put_super
(
struct
super_block
*
sb
)
...
@@ -750,7 +749,17 @@ int ncp_malloced;
...
@@ -750,7 +749,17 @@ int ncp_malloced;
int
ncp_current_malloced
;
int
ncp_current_malloced
;
#endif
#endif
static
DECLARE_FSTYPE
(
ncp_fs_type
,
"ncpfs"
,
ncp_read_super
,
0
);
static
struct
super_block
*
ncp_get_sb
(
struct
file_system_type
*
fs_type
,
int
flags
,
char
*
dev_name
,
void
*
data
)
{
return
get_sb_nodev
(
fs_type
,
flags
,
data
,
ncp_fill_super
);
}
static
struct
file_system_type
ncp_fs_type
=
{
owner:
THIS_MODULE
,
name:
"ncpfs"
,
get_sb:
ncp_get_sb
,
};
static
int
__init
init_ncp_fs
(
void
)
static
int
__init
init_ncp_fs
(
void
)
{
{
...
...
include/linux/ncp_fs.h
View file @
9b7f1d7e
...
@@ -228,7 +228,6 @@ static inline void ncp_kfree_s(void *obj, int size)
...
@@ -228,7 +228,6 @@ static inline void ncp_kfree_s(void *obj, int size)
/* linux/fs/ncpfs/inode.c */
/* linux/fs/ncpfs/inode.c */
int
ncp_notify_change
(
struct
dentry
*
,
struct
iattr
*
);
int
ncp_notify_change
(
struct
dentry
*
,
struct
iattr
*
);
struct
super_block
*
ncp_read_super
(
struct
super_block
*
,
void
*
,
int
);
struct
inode
*
ncp_iget
(
struct
super_block
*
,
struct
ncp_entry_info
*
);
struct
inode
*
ncp_iget
(
struct
super_block
*
,
struct
ncp_entry_info
*
);
void
ncp_update_inode
(
struct
inode
*
,
struct
ncp_entry_info
*
);
void
ncp_update_inode
(
struct
inode
*
,
struct
ncp_entry_info
*
);
void
ncp_update_inode2
(
struct
inode
*
,
struct
ncp_entry_info
*
);
void
ncp_update_inode2
(
struct
inode
*
,
struct
ncp_entry_info
*
);
...
...
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