Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
ad8b15f0
K
Kernel
项目概览
openeuler
/
Kernel
12 个月 前同步成功
通知
5
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
ad8b15f0
编写于
8月 08, 2008
作者:
S
Steve French
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CIFS] list entry can not return null
Signed-off-by:
N
Steve French
<
sfrench@us.ibm.com
>
上级
0510eeb7
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
61 addition
and
74 deletion
+61
-74
fs/cifs/cifs_debug.c
fs/cifs/cifs_debug.c
+24
-29
fs/cifs/cifsfs.c
fs/cifs/cifsfs.c
+33
-38
fs/cifs/cifssmb.c
fs/cifs/cifssmb.c
+1
-2
fs/cifs/connect.c
fs/cifs/connect.c
+3
-5
未找到文件。
fs/cifs/cifs_debug.c
浏览文件 @
ad8b15f0
...
...
@@ -79,27 +79,25 @@ void cifs_dump_mids(struct TCP_Server_Info *server)
spin_lock
(
&
GlobalMid_Lock
);
list_for_each
(
tmp
,
&
server
->
pending_mid_q
)
{
mid_entry
=
list_entry
(
tmp
,
struct
mid_q_entry
,
qhead
);
if
(
mid_entry
)
{
cERROR
(
1
,
(
"State: %d Cmd: %d Pid: %d Tsk: %p Mid %d"
,
mid_entry
->
midState
,
(
int
)
mid_entry
->
command
,
mid_entry
->
pid
,
mid_entry
->
tsk
,
mid_entry
->
mid
));
cERROR
(
1
,
(
"State: %d Cmd: %d Pid: %d Tsk: %p Mid %d"
,
mid_entry
->
midState
,
(
int
)
mid_entry
->
command
,
mid_entry
->
pid
,
mid_entry
->
tsk
,
mid_entry
->
mid
));
#ifdef CONFIG_CIFS_STATS2
cERROR
(
1
,
(
"IsLarge: %d buf: %p time rcv: %ld now: %ld"
,
mid_entry
->
largeBuf
,
mid_entry
->
resp_buf
,
mid_entry
->
when_received
,
jiffies
));
cERROR
(
1
,
(
"IsLarge: %d buf: %p time rcv: %ld now: %ld"
,
mid_entry
->
largeBuf
,
mid_entry
->
resp_buf
,
mid_entry
->
when_received
,
jiffies
));
#endif
/* STATS2 */
cERROR
(
1
,
(
"IsMult: %d IsEnd: %d"
,
mid_entry
->
multiRsp
,
mid_entry
->
multiEnd
));
if
(
mid_entry
->
resp_buf
)
{
cifs_dump_detail
(
mid_entry
->
resp_buf
);
cifs_dump_mem
(
"existing buf: "
,
mid_entry
->
resp_buf
,
62
);
}
cERROR
(
1
,
(
"IsMult: %d IsEnd: %d"
,
mid_entry
->
multiRsp
,
mid_entry
->
multiEnd
));
if
(
mid_entry
->
resp_buf
)
{
cifs_dump_detail
(
mid_entry
->
resp_buf
);
cifs_dump_mem
(
"existing buf: "
,
mid_entry
->
resp_buf
,
62
);
}
}
spin_unlock
(
&
GlobalMid_Lock
);
...
...
@@ -163,16 +161,13 @@ static int cifs_debug_data_proc_show(struct seq_file *m, void *v)
mid_entry
=
list_entry
(
tmp1
,
struct
mid_q_entry
,
qhead
);
if
(
mid_entry
)
{
seq_printf
(
m
,
"State: %d com: %d pid:"
" %d tsk: %p mid %d
\n
"
,
mid_entry
->
midState
,
(
int
)
mid_entry
->
command
,
mid_entry
->
pid
,
mid_entry
->
tsk
,
mid_entry
->
mid
);
}
seq_printf
(
m
,
"State: %d com: %d pid:"
" %d tsk: %p mid %d
\n
"
,
mid_entry
->
midState
,
(
int
)
mid_entry
->
command
,
mid_entry
->
pid
,
mid_entry
->
tsk
,
mid_entry
->
mid
);
}
spin_unlock
(
&
GlobalMid_Lock
);
}
...
...
fs/cifs/cifsfs.c
浏览文件 @
ad8b15f0
...
...
@@ -930,36 +930,34 @@ static int cifs_oplock_thread(void *dummyarg)
schedule_timeout
(
39
*
HZ
);
}
else
{
oplock_item
=
list_entry
(
GlobalOplock_Q
.
next
,
struct
oplock_q_entry
,
qhead
);
if
(
oplock_item
)
{
cFYI
(
1
,
(
"found oplock item to write out"
));
pTcon
=
oplock_item
->
tcon
;
inode
=
oplock_item
->
pinode
;
netfid
=
oplock_item
->
netfid
;
spin_unlock
(
&
GlobalMid_Lock
);
DeleteOplockQEntry
(
oplock_item
);
/* can not grab inode sem here since it would
struct
oplock_q_entry
,
qhead
);
cFYI
(
1
,
(
"found oplock item to write out"
));
pTcon
=
oplock_item
->
tcon
;
inode
=
oplock_item
->
pinode
;
netfid
=
oplock_item
->
netfid
;
spin_unlock
(
&
GlobalMid_Lock
);
DeleteOplockQEntry
(
oplock_item
);
/* can not grab inode sem here since it would
deadlock when oplock received on delete
since vfs_unlink holds the i_mutex across
the call */
/* mutex_lock(&inode->i_mutex);*/
if
(
S_ISREG
(
inode
->
i_mode
))
{
rc
=
filemap_fdatawrite
(
inode
->
i_mapping
);
if
(
CIFS_I
(
inode
)
->
clientCanCacheRead
==
0
)
{
waitrc
=
filemap_fdatawait
(
inode
->
i_mapping
);
invalidate_remote_inode
(
inode
);
}
if
(
rc
==
0
)
rc
=
waitrc
;
}
else
rc
=
0
;
/* mutex_unlock(&inode->i_mutex);*/
if
(
rc
)
CIFS_I
(
inode
)
->
write_behind_rc
=
rc
;
cFYI
(
1
,
(
"Oplock flush inode %p rc %d"
,
inode
,
rc
));
/* mutex_lock(&inode->i_mutex);*/
if
(
S_ISREG
(
inode
->
i_mode
))
{
rc
=
filemap_fdatawrite
(
inode
->
i_mapping
);
if
(
CIFS_I
(
inode
)
->
clientCanCacheRead
==
0
)
{
waitrc
=
filemap_fdatawait
(
inode
->
i_mapping
);
invalidate_remote_inode
(
inode
);
}
if
(
rc
==
0
)
rc
=
waitrc
;
}
else
rc
=
0
;
/* mutex_unlock(&inode->i_mutex);*/
if
(
rc
)
CIFS_I
(
inode
)
->
write_behind_rc
=
rc
;
cFYI
(
1
,
(
"Oplock flush inode %p rc %d"
,
inode
,
rc
));
/* releasing stale oplock after recent reconnect
of smb session using a now incorrect file
...
...
@@ -967,15 +965,13 @@ static int cifs_oplock_thread(void *dummyarg)
not bother sending an oplock release if session
to server still is disconnected since oplock
already released by the server in that case */
if
(
pTcon
->
tidStatus
!=
CifsNeedReconnect
)
{
rc
=
CIFSSMBLock
(
0
,
pTcon
,
netfid
,
0
/* len */
,
0
/* offset */
,
0
,
0
,
LOCKING_ANDX_OPLOCK_RELEASE
,
false
/* wait flag */
);
cFYI
(
1
,
(
"Oplock release rc = %d"
,
rc
));
}
}
else
spin_unlock
(
&
GlobalMid_Lock
);
if
(
pTcon
->
tidStatus
!=
CifsNeedReconnect
)
{
rc
=
CIFSSMBLock
(
0
,
pTcon
,
netfid
,
0
/* len */
,
0
/* offset */
,
0
,
0
,
LOCKING_ANDX_OPLOCK_RELEASE
,
false
/* wait flag */
);
cFYI
(
1
,
(
"Oplock release rc = %d"
,
rc
));
}
set_current_state
(
TASK_INTERRUPTIBLE
);
schedule_timeout
(
1
);
/* yield in case q were corrupt */
}
...
...
@@ -1001,8 +997,7 @@ static int cifs_dnotify_thread(void *dummyarg)
list_for_each
(
tmp
,
&
GlobalSMBSessionList
)
{
ses
=
list_entry
(
tmp
,
struct
cifsSesInfo
,
cifsSessionList
);
if
(
ses
&&
ses
->
server
&&
atomic_read
(
&
ses
->
server
->
inFlight
))
if
(
ses
->
server
&&
atomic_read
(
&
ses
->
server
->
inFlight
))
wake_up_all
(
&
ses
->
server
->
response_q
);
}
read_unlock
(
&
GlobalSMBSeslock
);
...
...
fs/cifs/cifssmb.c
浏览文件 @
ad8b15f0
...
...
@@ -128,8 +128,7 @@ static void mark_open_files_invalid(struct cifsTconInfo *pTcon)
write_lock
(
&
GlobalSMBSeslock
);
list_for_each_safe
(
tmp
,
tmp1
,
&
pTcon
->
openFileList
)
{
open_file
=
list_entry
(
tmp
,
struct
cifsFileInfo
,
tlist
);
if
(
open_file
)
open_file
->
invalidHandle
=
true
;
open_file
->
invalidHandle
=
true
;
}
write_unlock
(
&
GlobalSMBSeslock
);
/* BB Add call to invalidate_inodes(sb) for all superblocks mounted
...
...
fs/cifs/connect.c
浏览文件 @
ad8b15f0
...
...
@@ -151,7 +151,7 @@ cifs_reconnect(struct TCP_Server_Info *server)
}
list_for_each
(
tmp
,
&
GlobalTreeConnectionList
)
{
tcon
=
list_entry
(
tmp
,
struct
cifsTconInfo
,
cifsConnectionList
);
if
((
tcon
)
&&
(
tcon
->
ses
)
&&
(
tcon
->
ses
->
server
==
server
))
if
((
tcon
->
ses
)
&&
(
tcon
->
ses
->
server
==
server
))
tcon
->
tidStatus
=
CifsNeedReconnect
;
}
read_unlock
(
&
GlobalSMBSeslock
);
...
...
@@ -173,14 +173,12 @@ cifs_reconnect(struct TCP_Server_Info *server)
mid_entry
=
list_entry
(
tmp
,
struct
mid_q_entry
,
qhead
);
if
(
mid_entry
)
{
if
(
mid_entry
->
midState
==
MID_REQUEST_SUBMITTED
)
{
if
(
mid_entry
->
midState
==
MID_REQUEST_SUBMITTED
)
{
/* Mark other intransit requests as needing
retry so we do not immediately mark the
session bad again (ie after we reconnect
below) as they timeout too */
mid_entry
->
midState
=
MID_RETRY_NEEDED
;
}
mid_entry
->
midState
=
MID_RETRY_NEEDED
;
}
}
spin_unlock
(
&
GlobalMid_Lock
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录