Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
etercifs
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
etersoft
etercifs
Commits
666d039e
Commit
666d039e
authored
Jan 19, 2009
by
Konstantin Baev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update sources/2.6.28
- source: cifs-2.6.git - refspec: v2.6.28-etercifs - commit: 9f132d1445a5a338b651b1db27b37aed3e7479e6 merge with new kernel minor version (v2.6.28.1)
parent
40ef4650
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
37 additions
and
13 deletions
+37
-13
cifs_dfs_ref.c
sources/2.6.28/cifs_dfs_ref.c
+36
-12
file.c
sources/2.6.28/file.c
+1
-1
No files found.
sources/2.6.28/cifs_dfs_ref.c
View file @
666d039e
...
...
@@ -122,7 +122,7 @@ static char *compose_mount_options(const char *sb_mountdata,
char
**
devname
)
{
int
rc
;
char
*
mountdata
;
char
*
mountdata
=
NULL
;
int
md_len
;
char
*
tkn_e
;
char
*
srvIP
=
NULL
;
...
...
@@ -136,10 +136,9 @@ static char *compose_mount_options(const char *sb_mountdata,
*
devname
=
cifs_get_share_name
(
ref
->
node_name
);
rc
=
dns_resolve_server_name_to_ip
(
*
devname
,
&
srvIP
);
if
(
rc
!=
0
)
{
cERROR
(
1
,
(
"%s: Failed to resolve server part of %s to IP"
,
__func__
,
*
devname
));
mountdata
=
ERR_PTR
(
rc
);
goto
compose_mount_options_out
;
cERROR
(
1
,
(
"%s: Failed to resolve server part of %s to IP: %d"
,
__func__
,
*
devname
,
rc
));;
goto
compose_mount_options_err
;
}
/* md_len = strlen(...) + 12 for 'sep+prefixpath='
* assuming that we have 'unc=' and 'ip=' in
...
...
@@ -149,8 +148,8 @@ static char *compose_mount_options(const char *sb_mountdata,
strlen
(
ref
->
node_name
)
+
12
;
mountdata
=
kzalloc
(
md_len
+
1
,
GFP_KERNEL
);
if
(
mountdata
==
NULL
)
{
mountdata
=
ERR_PTR
(
-
ENOMEM
)
;
goto
compose_mount_options_
out
;
rc
=
-
ENOMEM
;
goto
compose_mount_options_
err
;
}
/* copy all options except of unc,ip,prefixpath */
...
...
@@ -197,18 +196,32 @@ static char *compose_mount_options(const char *sb_mountdata,
/* find & copy prefixpath */
tkn_e
=
strchr
(
ref
->
node_name
+
2
,
'\\'
);
if
(
tkn_e
==
NULL
)
/* invalid unc, missing share name*/
goto
compose_mount_options_out
;
if
(
tkn_e
==
NULL
)
{
/* invalid unc, missing share name*/
rc
=
-
EINVAL
;
goto
compose_mount_options_err
;
}
/*
* this function gives us a path with a double backslash prefix. We
* require a single backslash for DFS. Temporarily increment fullpath
* to put it in the proper form and decrement before freeing it.
*/
fullpath
=
build_path_from_dentry
(
dentry
);
if
(
!
fullpath
)
{
rc
=
-
ENOMEM
;
goto
compose_mount_options_err
;
}
++
fullpath
;
tkn_e
=
strchr
(
tkn_e
+
1
,
'\\'
);
if
(
tkn_e
||
strlen
(
fullpath
)
-
(
ref
->
path_consumed
))
{
if
(
tkn_e
||
(
strlen
(
fullpath
)
-
ref
->
path_consumed
))
{
strncat
(
mountdata
,
&
sep
,
1
);
strcat
(
mountdata
,
"prefixpath="
);
if
(
tkn_e
)
strcat
(
mountdata
,
tkn_e
+
1
);
strcat
(
mountdata
,
fullpath
+
(
ref
->
path_consumed
)
);
strcat
(
mountdata
,
fullpath
+
ref
->
path_consumed
);
}
--
fullpath
;
kfree
(
fullpath
);
/*cFYI(1,("%s: parent mountdata: %s", __func__,sb_mountdata));*/
...
...
@@ -217,6 +230,11 @@ static char *compose_mount_options(const char *sb_mountdata,
compose_mount_options_out:
kfree
(
srvIP
);
return
mountdata
;
compose_mount_options_err:
kfree
(
mountdata
);
mountdata
=
ERR_PTR
(
rc
);
goto
compose_mount_options_out
;
}
...
...
@@ -309,13 +327,19 @@ cifs_dfs_follow_mountpoint(struct dentry *dentry, struct nameidata *nd)
goto
out_err
;
}
/*
* The MSDFS spec states that paths in DFS referral requests and
* responses must be prefixed by a single '\' character instead of
* the double backslashes usually used in the UNC. This function
* gives us the latter, so we must adjust the result.
*/
full_path
=
build_path_from_dentry
(
dentry
);
if
(
full_path
==
NULL
)
{
rc
=
-
ENOMEM
;
goto
out_err
;
}
rc
=
get_dfs_path
(
xid
,
ses
,
full_path
,
cifs_sb
->
local_nls
,
rc
=
get_dfs_path
(
xid
,
ses
,
full_path
+
1
,
cifs_sb
->
local_nls
,
&
num_referrals
,
&
referrals
,
cifs_sb
->
mnt_cifs_flags
&
CIFS_MOUNT_MAP_SPECIAL_CHR
);
...
...
sources/2.6.28/file.c
View file @
666d039e
...
...
@@ -2084,7 +2084,7 @@ static int cifs_write_begin(struct file *file, struct address_space *mapping,
cFYI
(
1
,
(
"write_begin from %lld len %d"
,
(
long
long
)
pos
,
len
));
page
=
__grab_cache_page
(
mapping
,
index
);
page
=
grab_cache_page_write_begin
(
mapping
,
index
,
flags
);
if
(
!
page
)
{
rc
=
-
ENOMEM
;
goto
out
;
...
...
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