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
418182b7
Commit
418182b7
authored
Mar 01, 2013
by
Pavel Shilovsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update 3.7 sources from stable (v3.7.10)
parent
67c27898
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
31 deletions
+45
-31
cifs_dfs_ref.c
sources/3.7/cifs_dfs_ref.c
+2
-0
readdir.c
sources/3.7/readdir.c
+32
-27
smb1ops.c
sources/3.7/smb1ops.c
+7
-0
smb2pdu.c
sources/3.7/smb2pdu.c
+1
-1
transport.c
sources/3.7/transport.c
+3
-3
No files found.
sources/3.7/cifs_dfs_ref.c
View file @
418182b7
...
...
@@ -226,6 +226,8 @@ compose_mount_options_out:
compose_mount_options_err:
kfree
(
mountdata
);
mountdata
=
ERR_PTR
(
rc
);
kfree
(
*
devname
);
*
devname
=
NULL
;
goto
compose_mount_options_out
;
}
...
...
sources/3.7/readdir.c
View file @
418182b7
...
...
@@ -66,18 +66,21 @@ static inline void dump_cifs_file_struct(struct file *file, char *label)
#endif
/* DEBUG2 */
/*
* Attempt to preload the dcache with the results from the FIND_FIRST/NEXT
*
* Find the dentry that matches "name". If there isn't one, create one. If it's
* a negative dentry or the uniqueid changed, then drop it and recreate it.
*/
static
struct
dentry
*
cifs_
readdir_lookup
(
struct
dentry
*
parent
,
struct
qstr
*
name
,
static
void
cifs_
prime_dcache
(
struct
dentry
*
parent
,
struct
qstr
*
name
,
struct
cifs_fattr
*
fattr
)
{
struct
dentry
*
dentry
,
*
alias
;
struct
inode
*
inode
;
struct
super_block
*
sb
=
parent
->
d_inode
->
i_sb
;
struct
cifs_sb_info
*
cifs_sb
=
CIFS_SB
(
sb
);
cFYI
(
1
,
"
For %s"
,
name
->
name
);
cFYI
(
1
,
"
%s: for %s"
,
__func__
,
name
->
name
);
if
(
parent
->
d_op
&&
parent
->
d_op
->
d_hash
)
parent
->
d_op
->
d_hash
(
parent
,
parent
->
d_inode
,
name
);
...
...
@@ -87,37 +90,42 @@ cifs_readdir_lookup(struct dentry *parent, struct qstr *name,
dentry
=
d_lookup
(
parent
,
name
);
if
(
dentry
)
{
int
err
;
inode
=
dentry
->
d_inode
;
/* update inode in place if i_ino didn't change */
if
(
inode
&&
CIFS_I
(
inode
)
->
uniqueid
==
fattr
->
cf_uniqueid
)
{
cifs_fattr_to_inode
(
inode
,
fattr
);
return
dentry
;
if
(
inode
)
{
/*
* If we're generating inode numbers, then we don't
* want to clobber the existing one with the one that
* the readdir code created.
*/
if
(
!
(
cifs_sb
->
mnt_cifs_flags
&
CIFS_MOUNT_SERVER_INUM
))
fattr
->
cf_uniqueid
=
CIFS_I
(
inode
)
->
uniqueid
;
/* update inode in place if i_ino didn't change */
if
(
CIFS_I
(
inode
)
->
uniqueid
==
fattr
->
cf_uniqueid
)
{
cifs_fattr_to_inode
(
inode
,
fattr
);
goto
out
;
}
}
err
=
d_invalidate
(
dentry
);
dput
(
dentry
);
if
(
err
)
return
NULL
;
return
;
}
dentry
=
d_alloc
(
parent
,
name
);
if
(
dentry
==
NULL
)
return
NULL
;
if
(
!
dentry
)
return
;
inode
=
cifs_iget
(
sb
,
fattr
);
if
(
!
inode
)
{
dput
(
dentry
);
return
NULL
;
}
if
(
!
inode
)
goto
out
;
alias
=
d_materialise_unique
(
dentry
,
inode
);
if
(
alias
!=
NULL
)
{
dput
(
dentry
);
if
(
IS_ERR
(
alias
))
return
NULL
;
dentry
=
alias
;
}
return
dentry
;
if
(
alias
&&
!
IS_ERR
(
alias
))
dput
(
alias
);
out:
dput
(
dentry
);
}
static
void
...
...
@@ -652,7 +660,6 @@ static int cifs_filldir(char *find_entry, struct file *file, filldir_t filldir,
struct
cifs_sb_info
*
cifs_sb
=
CIFS_SB
(
sb
);
struct
cifs_dirent
de
=
{
NULL
,
};
struct
cifs_fattr
fattr
;
struct
dentry
*
dentry
;
struct
qstr
name
;
int
rc
=
0
;
ino_t
ino
;
...
...
@@ -723,13 +730,11 @@ static int cifs_filldir(char *find_entry, struct file *file, filldir_t filldir,
*/
fattr
.
cf_flags
|=
CIFS_FATTR_NEED_REVAL
;
ino
=
cifs_uniqueid_to_ino_t
(
fattr
.
cf_uniqueid
);
dentry
=
cifs_readdir_lookup
(
file
->
f_dentry
,
&
name
,
&
fattr
);
cifs_prime_dcache
(
file
->
f_dentry
,
&
name
,
&
fattr
);
ino
=
cifs_uniqueid_to_ino_t
(
fattr
.
cf_uniqueid
);
rc
=
filldir
(
dirent
,
name
.
name
,
name
.
len
,
file
->
f_pos
,
ino
,
fattr
.
cf_dtype
);
dput
(
dentry
);
return
rc
;
}
...
...
sources/3.7/smb1ops.c
View file @
418182b7
...
...
@@ -53,6 +53,13 @@ send_nt_cancel(struct TCP_Server_Info *server, void *buf,
mutex_unlock
(
&
server
->
srv_mutex
);
return
rc
;
}
/*
* The response to this call was already factored into the sequence
* number when the call went out, so we must adjust it back downward
* after signing here.
*/
--
server
->
sequence_number
;
rc
=
smb_send
(
server
,
in_buf
,
be32_to_cpu
(
in_buf
->
smb_buf_length
));
mutex_unlock
(
&
server
->
srv_mutex
);
...
...
sources/3.7/smb2pdu.c
View file @
418182b7
...
...
@@ -425,7 +425,7 @@ SMB2_negotiate(const unsigned int xid, struct cifs_ses *ses)
}
cFYI
(
1
,
"sec_flags 0x%x"
,
sec_flags
);
if
(
sec_flags
&
CIFSSEC_MUST_SIGN
)
{
if
(
(
sec_flags
&
CIFSSEC_MUST_SIGN
)
==
CIFSSEC_MUST_SIGN
)
{
cFYI
(
1
,
"Signing required"
);
if
(
!
(
server
->
sec_mode
&
(
SMB2_NEGOTIATE_SIGNING_REQUIRED
|
SMB2_NEGOTIATE_SIGNING_ENABLED
)))
{
...
...
sources/3.7/transport.c
View file @
418182b7
...
...
@@ -144,9 +144,6 @@ smb_send_kvec(struct TCP_Server_Info *server, struct kvec *iov, size_t n_vec,
*
sent
=
0
;
if
(
ssocket
==
NULL
)
return
-
ENOTSOCK
;
/* BB eventually add reconnect code here */
smb_msg
.
msg_name
=
(
struct
sockaddr
*
)
&
server
->
dstaddr
;
smb_msg
.
msg_namelen
=
sizeof
(
struct
sockaddr
);
smb_msg
.
msg_control
=
NULL
;
...
...
@@ -291,6 +288,9 @@ smb_send_rqst(struct TCP_Server_Info *server, struct smb_rqst *rqst)
struct
socket
*
ssocket
=
server
->
ssocket
;
int
val
=
1
;
if
(
ssocket
==
NULL
)
return
-
ENOTSOCK
;
cFYI
(
1
,
"Sending smb: smb_len=%u"
,
smb_buf_length
);
dump_smb
(
iov
[
0
].
iov_base
,
iov
[
0
].
iov_len
);
...
...
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