Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
83ff6fe8
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
83ff6fe8
编写于
3月 02, 2008
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[PATCH] don't mess with file in scsi_nonblockable_ioctl()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
633a08b8
变更
5
显示空白变更内容
内联
并排
Showing
5 changed file
with
9 addition
and
6 deletion
+9
-6
drivers/scsi/scsi_ioctl.c
drivers/scsi/scsi_ioctl.c
+2
-2
drivers/scsi/sd.c
drivers/scsi/sd.c
+2
-1
drivers/scsi/sr.c
drivers/scsi/sr.c
+2
-1
drivers/scsi/st.c
drivers/scsi/st.c
+2
-1
include/scsi/scsi_ioctl.h
include/scsi/scsi_ioctl.h
+1
-1
未找到文件。
drivers/scsi/scsi_ioctl.c
浏览文件 @
83ff6fe8
...
...
@@ -277,14 +277,14 @@ EXPORT_SYMBOL(scsi_ioctl);
* @filp: either NULL or a &struct file which must have the O_NONBLOCK flag.
*/
int
scsi_nonblockable_ioctl
(
struct
scsi_device
*
sdev
,
int
cmd
,
void
__user
*
arg
,
struct
file
*
filp
)
void
__user
*
arg
,
int
ndelay
)
{
int
val
,
result
;
/* The first set of iocts may be executed even if we're doing
* error processing, as long as the device was opened
* non-blocking */
if
(
filp
&&
(
filp
->
f_flags
&
O_NONBLOCK
)
)
{
if
(
ndelay
)
{
if
(
scsi_host_in_recovery
(
sdev
->
host
))
return
-
ENODEV
;
}
else
if
(
!
scsi_block_when_processing_errors
(
sdev
))
...
...
drivers/scsi/sd.c
浏览文件 @
83ff6fe8
...
...
@@ -761,7 +761,8 @@ static int sd_ioctl(struct inode * inode, struct file * filp,
* may try and take the device offline, in which case all further
* access to the device is prohibited.
*/
error
=
scsi_nonblockable_ioctl
(
sdp
,
cmd
,
p
,
filp
);
error
=
scsi_nonblockable_ioctl
(
sdp
,
cmd
,
p
,
filp
?
filp
->
f_flags
&
O_NDELAY
:
0
);
if
(
!
scsi_block_when_processing_errors
(
sdp
)
||
!
error
)
return
error
;
...
...
drivers/scsi/sr.c
浏览文件 @
83ff6fe8
...
...
@@ -524,7 +524,8 @@ static int sr_block_ioctl(struct inode *inode, struct file *file, unsigned cmd,
* case fall through to scsi_ioctl, which will return ENDOEV again
* if it doesn't recognise the ioctl
*/
ret
=
scsi_nonblockable_ioctl
(
sdev
,
cmd
,
argp
,
NULL
);
ret
=
scsi_nonblockable_ioctl
(
sdev
,
cmd
,
argp
,
file
?
file
->
f_flags
&
O_NDELAY
:
0
);
if
(
ret
!=
-
ENODEV
)
return
ret
;
return
scsi_ioctl
(
sdev
,
cmd
,
argp
);
...
...
drivers/scsi/st.c
浏览文件 @
83ff6fe8
...
...
@@ -3263,7 +3263,8 @@ static long st_ioctl(struct file *file, unsigned int cmd_in, unsigned long arg)
* may try and take the device offline, in which case all further
* access to the device is prohibited.
*/
retval
=
scsi_nonblockable_ioctl
(
STp
->
device
,
cmd_in
,
p
,
file
);
retval
=
scsi_nonblockable_ioctl
(
STp
->
device
,
cmd_in
,
p
,
file
->
f_flags
&
O_NDELAY
);
if
(
!
scsi_block_when_processing_errors
(
STp
->
device
)
||
retval
!=
-
ENODEV
)
goto
out
;
retval
=
0
;
...
...
include/scsi/scsi_ioctl.h
浏览文件 @
83ff6fe8
...
...
@@ -42,7 +42,7 @@ typedef struct scsi_fctargaddress {
extern
int
scsi_ioctl
(
struct
scsi_device
*
,
int
,
void
__user
*
);
extern
int
scsi_nonblockable_ioctl
(
struct
scsi_device
*
sdev
,
int
cmd
,
void
__user
*
arg
,
struct
file
*
filp
);
void
__user
*
arg
,
int
ndelay
);
#endif
/* __KERNEL__ */
#endif
/* _SCSI_IOCTL_H */
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录