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
c0fc6f25
Commit
c0fc6f25
authored
Apr 15, 2004
by
Steve French
Browse files
Options
Browse Files
Download
Plain Diff
Merge
bk://cifs.bkbits.net/linux-2.5cifs
into stevef95.austin.ibm.com:/usr/src/bk/linux-2.5cifs
parents
5abccd42
8b550088
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
17 deletions
+39
-17
fs/cifs/CHANGES
fs/cifs/CHANGES
+3
-1
fs/cifs/connect.c
fs/cifs/connect.c
+18
-2
fs/cifs/file.c
fs/cifs/file.c
+7
-9
fs/cifs/netmisc.c
fs/cifs/netmisc.c
+11
-5
No files found.
fs/cifs/CHANGES
View file @
c0fc6f25
Version 1.07
------------
Fix some small memory leaks in some unmount error paths.
Fix some small memory leaks in some unmount error paths. Fix major leak
of cache pages in readpages causing multiple read oriented stress
testcases (including fsx, and even large file copy) to fail over time.
Version 1.06
------------
...
...
fs/cifs/connect.c
View file @
c0fc6f25
...
...
@@ -44,7 +44,7 @@ extern void SMBencrypt(unsigned char *passwd, unsigned char *c8,
unsigned
char
*
p24
);
extern
void
SMBNTencrypt
(
unsigned
char
*
passwd
,
unsigned
char
*
c8
,
unsigned
char
*
p24
);
extern
int
cifs_inet_
addr
(
char
*
);
extern
int
cifs_inet_
pton
(
int
,
const
char
*
,
void
*
dst
);
struct
smb_vol
{
char
*
username
;
...
...
@@ -992,7 +992,23 @@ cifs_mount(struct super_block *sb, struct cifs_sb_info *cifs_sb,
}
if
(
volume_info
.
UNCip
&&
volume_info
.
UNC
)
{
sin_server
.
sin_addr
.
s_addr
=
cifs_inet_addr
(
volume_info
.
UNCip
);
rc
=
cifs_inet_pton
(
AF_INET
,
volume_info
.
UNCip
,
&
sin_server
.
sin_addr
.
s_addr
);
if
(
rc
==
0
)
{
/* not ipv4 address, try ipv6 */
rc
=
cifs_inet_pton
(
AF_INET6
,
volume_info
.
UNCip
,
&
sin_server6
.
sin6_addr
.
in6_u
);
}
if
(
rc
!=
1
)
{
/* we failed translating address */
if
(
volume_info
.
UNC
)
kfree
(
volume_info
.
UNC
);
if
(
volume_info
.
password
)
kfree
(
volume_info
.
password
);
FreeXid
(
xid
);
return
-
EINVAL
;
}
cFYI
(
1
,
(
"UNC: %s ip: %s "
,
volume_info
.
UNC
,
volume_info
.
UNCip
));
}
else
if
(
volume_info
.
UNCip
){
/* BB using ip addr as server name connect to the DFS root below */
...
...
fs/cifs/file.c
View file @
c0fc6f25
...
...
@@ -933,7 +933,6 @@ static void cifs_copy_cache_pages(struct address_space *mapping,
continue
;
}
page_cache_get
(
page
);
target
=
kmap_atomic
(
page
,
KM_USER0
);
if
(
PAGE_CACHE_SIZE
>
bytes_read
)
{
...
...
@@ -947,12 +946,11 @@ static void cifs_copy_cache_pages(struct address_space *mapping,
}
kunmap_atomic
(
target
,
KM_USER0
);
if
(
!
pagevec_add
(
plru_pvec
,
page
))
__pagevec_lru_add
(
plru_pvec
);
flush_dcache_page
(
page
);
SetPageUptodate
(
page
);
unlock_page
(
page
);
/* BB verify we need to unlock here */
/* page_cache_release(page);*/
unlock_page
(
page
);
if
(
!
pagevec_add
(
plru_pvec
,
page
))
__pagevec_lru_add
(
plru_pvec
);
data
+=
PAGE_CACHE_SIZE
;
}
return
;
...
...
@@ -1092,10 +1090,10 @@ cifs_readpages(struct file *file, struct address_space *mapping,
pagevec_lru_add
(
&
lru_pvec
);
/* need to free smb_read_data buf before exit */
if
(
smb_read_data
)
{
if
(
smb_read_data
)
{
cifs_buf_release
(
smb_read_data
);
smb_read_data
=
0
;
}
}
FreeXid
(
xid
);
return
rc
;
...
...
fs/cifs/netmisc.c
View file @
c0fc6f25
...
...
@@ -125,10 +125,10 @@ const struct smb_to_posix_error mapping_table_ERRHRD[] = {
/* Convert string containing dotted ip address to binary form */
/* returns 0 if invalid address */
/* BB add address family, change rc to status flag and return
*//* also see inet_pton
*/
/*
To identify v4 vs. v6 - 1) check for colon (v6 only) 2) then call inet_pton to parse for bad address
*/
/* BB add address family, change rc to status flag and return
union or for ipv6
*/
/*
will need parent to call something like inet_pton to convert ipv6 address BB
*/
int
cifs_inet_
addr
(
char
*
cp
)
cifs_inet_
pton
(
int
address_family
,
char
*
cp
,
void
*
dst
)
{
struct
in_addr
address
;
int
value
;
...
...
@@ -140,6 +140,9 @@ cifs_inet_addr(char *cp)
static
const
int
addr_class_max
[
4
]
=
{
0xffffffff
,
0xffffff
,
0xffff
,
0xff
};
if
(
address_family
!=
AF_INET
)
return
-
EAFNOSUPPORT
;
for
(
i
=
0
;
i
<
4
;
i
++
)
{
bytes
[
i
]
=
0
;
}
...
...
@@ -166,6 +169,9 @@ cifs_inet_addr(char *cp)
return
0
;
*
end
++
=
value
;
temp
=
*++
cp
;
}
else
if
(
temp
==
':'
)
{
cFYI
(
1
,(
"IPv6 addresses not supported for CIFS mounts yet"
));
return
-
1
;
}
else
break
;
}
...
...
@@ -182,8 +188,8 @@ cifs_inet_addr(char *cp)
return
0
;
address
.
s_addr
=
*
((
int
*
)
bytes
)
|
htonl
(
value
);
return
address
.
s_addr
;
*
((
int
*
)
dst
)
=
address
.
s_addr
;
return
1
;
/* success */
}
/*****************************************************************************
...
...
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