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
25188977
Commit
25188977
authored
Jul 02, 2016
by
Pavel Shilovsky
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update 3.16 sources from stable (v3.16.36)
parent
198a6f9f
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
48 additions
and
32 deletions
+48
-32
cifs_debug.c
sources/3.16/cifs_debug.c
+1
-1
cifs_debug.h
sources/3.16/cifs_debug.h
+4
-6
cifsencrypt.c
sources/3.16/cifsencrypt.c
+1
-1
cifsfs.h
sources/3.16/cifsfs.h
+4
-8
cifssmb.c
sources/3.16/cifssmb.c
+18
-3
connect.c
sources/3.16/connect.c
+1
-1
readdir.c
sources/3.16/readdir.c
+1
-0
smb2pdu.c
sources/3.16/smb2pdu.c
+14
-10
transport.c
sources/3.16/transport.c
+4
-2
No files found.
sources/3.16/cifs_debug.c
View file @
25188977
...
...
@@ -68,7 +68,7 @@ void cifs_vfs_err(const char *fmt, ...)
vaf
.
fmt
=
fmt
;
vaf
.
va
=
&
args
;
pr
intk
(
KERN_ERR
"CIFS VFS: %pV"
,
&
vaf
);
pr
_err_ratelimited
(
"CIFS VFS: %pV"
,
&
vaf
);
va_end
(
args
);
}
...
...
sources/3.16/cifs_debug.h
View file @
25188977
...
...
@@ -51,15 +51,13 @@ __printf(1, 2) void cifs_vfs_err(const char *fmt, ...);
/* information message: e.g., configuration, major event */
#define cifs_dbg(type, fmt, ...) \
do { \
if (type == FYI) { \
if (cifsFYI & CIFS_INFO) { \
printk(KERN_DEBUG "%s: " fmt, \
__FILE__, ##__VA_ARGS__); \
} \
if (type == FYI && cifsFYI & CIFS_INFO) { \
pr_debug_ratelimited("%s: " \
fmt, __FILE__, ##__VA_ARGS__); \
} else if (type == VFS) { \
cifs_vfs_err(fmt, ##__VA_ARGS__); \
} else if (type == NOISY && type != 0) { \
pr
intk(KERN_DEBUG fmt, ##__VA_ARGS__);
\
pr
_debug_ratelimited(fmt, ##__VA_ARGS__);
\
} \
} while (0)
...
...
sources/3.16/cifsencrypt.c
View file @
25188977
...
...
@@ -710,7 +710,7 @@ setup_ntlmv2_rsp(struct cifs_ses *ses, const struct nls_table *nls_cp)
ses
->
auth_key
.
response
=
kmalloc
(
baselen
+
tilen
,
GFP_KERNEL
);
if
(
!
ses
->
auth_key
.
response
)
{
rc
=
ENOMEM
;
rc
=
-
ENOMEM
;
ses
->
auth_key
.
len
=
0
;
goto
setup_ntlmv2_rsp_ret
;
}
...
...
sources/3.16/cifsfs.h
View file @
25188977
...
...
@@ -31,19 +31,15 @@
* so that it will fit. We use hash_64 to convert the value to 31 bits, and
* then add 1, to ensure that we don't end up with a 0 as the value.
*/
#if BITS_PER_LONG == 64
static
inline
ino_t
cifs_uniqueid_to_ino_t
(
u64
fileid
)
{
if
((
sizeof
(
ino_t
))
<
(
sizeof
(
u64
)))
return
(
ino_t
)
hash_64
(
fileid
,
(
sizeof
(
ino_t
)
*
8
)
-
1
)
+
1
;
return
(
ino_t
)
fileid
;
}
#else
static
inline
ino_t
cifs_uniqueid_to_ino_t
(
u64
fileid
)
{
return
(
ino_t
)
hash_64
(
fileid
,
(
sizeof
(
ino_t
)
*
8
)
-
1
)
+
1
;
}
#endif
extern
struct
file_system_type
cifs_fs_type
;
extern
const
struct
address_space_operations
cifs_addr_ops
;
...
...
sources/3.16/cifssmb.c
View file @
25188977
...
...
@@ -1406,11 +1406,10 @@ openRetry:
* current bigbuf.
*/
static
int
cifs_readv_discard
(
struct
TCP_Server_Info
*
server
,
struct
mid_q_entry
*
mid
)
discard_remaining_data
(
struct
TCP_Server_Info
*
server
)
{
unsigned
int
rfclen
=
get_rfc1002_length
(
server
->
smallbuf
);
int
remaining
=
rfclen
+
4
-
server
->
total_read
;
struct
cifs_readdata
*
rdata
=
mid
->
callback_data
;
while
(
remaining
>
0
)
{
int
length
;
...
...
@@ -1424,10 +1423,20 @@ cifs_readv_discard(struct TCP_Server_Info *server, struct mid_q_entry *mid)
remaining
-=
length
;
}
dequeue_mid
(
mid
,
rdata
->
result
);
return
0
;
}
static
int
cifs_readv_discard
(
struct
TCP_Server_Info
*
server
,
struct
mid_q_entry
*
mid
)
{
int
length
;
struct
cifs_readdata
*
rdata
=
mid
->
callback_data
;
length
=
discard_remaining_data
(
server
);
dequeue_mid
(
mid
,
rdata
->
result
);
return
length
;
}
int
cifs_readv_receive
(
struct
TCP_Server_Info
*
server
,
struct
mid_q_entry
*
mid
)
{
...
...
@@ -1456,6 +1465,12 @@ cifs_readv_receive(struct TCP_Server_Info *server, struct mid_q_entry *mid)
return
length
;
server
->
total_read
+=
length
;
if
(
server
->
ops
->
is_status_pending
&&
server
->
ops
->
is_status_pending
(
buf
,
server
,
0
))
{
discard_remaining_data
(
server
);
return
-
1
;
}
/* Was the SMB read successful? */
rdata
->
result
=
server
->
ops
->
map_error
(
buf
,
false
);
if
(
rdata
->
result
!=
0
)
{
...
...
sources/3.16/connect.c
View file @
25188977
...
...
@@ -355,7 +355,6 @@ cifs_reconnect(struct TCP_Server_Info *server)
server
->
session_key
.
response
=
NULL
;
server
->
session_key
.
len
=
0
;
server
->
lstrp
=
jiffies
;
mutex_unlock
(
&
server
->
srv_mutex
);
/* mark submitted MIDs for retry and issue callback */
INIT_LIST_HEAD
(
&
retry_list
);
...
...
@@ -368,6 +367,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
list_move
(
&
mid_entry
->
qhead
,
&
retry_list
);
}
spin_unlock
(
&
GlobalMid_Lock
);
mutex_unlock
(
&
server
->
srv_mutex
);
cifs_dbg
(
FYI
,
"%s: issuing mid callbacks
\n
"
,
__func__
);
list_for_each_safe
(
tmp
,
tmp2
,
&
retry_list
)
{
...
...
sources/3.16/readdir.c
View file @
25188977
...
...
@@ -849,6 +849,7 @@ int cifs_readdir(struct file *file, struct dir_context *ctx)
* if buggy server returns . and .. late do we want to
* check for that here?
*/
*
tmp_buf
=
0
;
rc
=
cifs_filldir
(
current_entry
,
file
,
ctx
,
tmp_buf
,
max_len
);
if
(
rc
)
{
...
...
sources/3.16/smb2pdu.c
View file @
25188977
...
...
@@ -1012,21 +1012,25 @@ parse_lease_state(struct TCP_Server_Info *server, struct smb2_create_rsp *rsp,
{
char
*
data_offset
;
struct
create_context
*
cc
;
unsigned
int
next
=
0
;
unsigned
int
next
;
unsigned
int
remaining
;
char
*
name
;
data_offset
=
(
char
*
)
rsp
+
4
+
le32_to_cpu
(
rsp
->
CreateContextsOffset
);
remaining
=
le32_to_cpu
(
rsp
->
CreateContextsLength
);
cc
=
(
struct
create_context
*
)
data_offset
;
do
{
cc
=
(
struct
create_context
*
)((
char
*
)
cc
+
next
);
while
(
remaining
>=
sizeof
(
struct
create_context
))
{
name
=
le16_to_cpu
(
cc
->
NameOffset
)
+
(
char
*
)
cc
;
if
(
le16_to_cpu
(
cc
->
NameLength
)
!=
4
||
strncmp
(
name
,
"RqLs"
,
4
))
{
next
=
le32_to_cpu
(
cc
->
Next
);
continue
;
}
return
server
->
ops
->
parse_lease_buf
(
cc
,
epoch
);
}
while
(
next
!=
0
);
if
(
le16_to_cpu
(
cc
->
NameLength
)
==
4
&&
strncmp
(
name
,
"RqLs"
,
4
)
==
0
)
return
server
->
ops
->
parse_lease_buf
(
cc
,
epoch
);
next
=
le32_to_cpu
(
cc
->
Next
);
if
(
!
next
)
break
;
remaining
-=
next
;
cc
=
(
struct
create_context
*
)((
char
*
)
cc
+
next
);
}
return
0
;
}
...
...
sources/3.16/transport.c
View file @
25188977
...
...
@@ -564,14 +564,16 @@ cifs_call_async(struct TCP_Server_Info *server, struct smb_rqst *rqst,
cifs_in_send_dec
(
server
);
cifs_save_when_sent
(
mid
);
if
(
rc
<
0
)
if
(
rc
<
0
)
{
server
->
sequence_number
-=
2
;
cifs_delete_mid
(
mid
);
}
mutex_unlock
(
&
server
->
srv_mutex
);
if
(
rc
==
0
)
return
0
;
cifs_delete_mid
(
mid
);
add_credits
(
server
,
1
,
optype
);
wake_up
(
&
server
->
request_q
);
return
rc
;
...
...
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