Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
kernel_linux
提交
ff694527
K
kernel_linux
项目概览
OpenHarmony
/
kernel_linux
上一次同步 3 年多
通知
13
Star
8
Fork
2
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kernel_linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
ff694527
编写于
4月 20, 2009
作者:
S
Steve French
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[CIFS] Make cifs_unlink consistent in checks for null inode
Signed-off-by:
N
Steve French
<
sfrench@us.ibm.com
>
上级
ff54250a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
22 addition
and
7 deletion
+22
-7
fs/cifs/CHANGES
fs/cifs/CHANGES
+6
-0
fs/cifs/cifsfs.h
fs/cifs/cifsfs.h
+1
-1
fs/cifs/inode.c
fs/cifs/inode.c
+15
-6
未找到文件。
fs/cifs/CHANGES
浏览文件 @
ff694527
Version 1.58
------------
Guard against buffer overruns in various UCS-2 to UTF-8 string conversions
when the UTF-8 string is composed of unusually long (more than 4 byte) converted
characters.
Version 1.57
------------
Improve support for multiple security contexts to the same server. We
...
...
fs/cifs/cifsfs.h
浏览文件 @
ff694527
...
...
@@ -100,5 +100,5 @@ extern long cifs_ioctl(struct file *filep, unsigned int cmd, unsigned long arg);
extern
const
struct
export_operations
cifs_export_ops
;
#endif
/* EXPERIMENTAL */
#define CIFS_VERSION "1.5
7
"
#define CIFS_VERSION "1.5
8
"
#endif
/* _CIFSFS_H */
fs/cifs/inode.c
浏览文件 @
ff694527
...
...
@@ -962,13 +962,21 @@ cifs_rename_pending_delete(char *full_path, struct dentry *dentry, int xid)
goto
out_close
;
}
/*
* If dentry->d_inode is null (usually meaning the cached dentry
* is a negative dentry) then we would attempt a standard SMB delete, but
* if that fails we can not attempt the fall back mechanisms on EACESS
* but will return the EACESS to the caller. Note that the VFS does not call
* unlink on negative dentries currently.
*/
int
cifs_unlink
(
struct
inode
*
dir
,
struct
dentry
*
dentry
)
{
int
rc
=
0
;
int
xid
;
char
*
full_path
=
NULL
;
struct
inode
*
inode
=
dentry
->
d_inode
;
struct
cifsInodeInfo
*
cifs
Inode
=
CIFS_I
(
inode
)
;
struct
cifsInodeInfo
*
cifs
_inode
;
struct
super_block
*
sb
=
dir
->
i_sb
;
struct
cifs_sb_info
*
cifs_sb
=
CIFS_SB
(
sb
);
struct
cifsTconInfo
*
tcon
=
cifs_sb
->
tcon
;
...
...
@@ -1012,7 +1020,7 @@ int cifs_unlink(struct inode *dir, struct dentry *dentry)
rc
=
cifs_rename_pending_delete
(
full_path
,
dentry
,
xid
);
if
(
rc
==
0
)
drop_nlink
(
inode
);
}
else
if
(
rc
==
-
EACCES
&&
dosattr
==
0
)
{
}
else
if
(
(
rc
==
-
EACCES
)
&&
(
dosattr
==
0
)
&&
inode
)
{
attrs
=
kzalloc
(
sizeof
(
*
attrs
),
GFP_KERNEL
);
if
(
attrs
==
NULL
)
{
rc
=
-
ENOMEM
;
...
...
@@ -1020,7 +1028,8 @@ int cifs_unlink(struct inode *dir, struct dentry *dentry)
}
/* try to reset dos attributes */
origattr
=
cifsInode
->
cifsAttrs
;
cifs_inode
=
CIFS_I
(
inode
);
origattr
=
cifs_inode
->
cifsAttrs
;
if
(
origattr
==
0
)
origattr
|=
ATTR_NORMAL
;
dosattr
=
origattr
&
~
ATTR_READONLY
;
...
...
@@ -1041,13 +1050,13 @@ int cifs_unlink(struct inode *dir, struct dentry *dentry)
out_reval:
if
(
inode
)
{
cifs
I
node
=
CIFS_I
(
inode
);
cifs
I
node
->
time
=
0
;
/* will force revalidate to get info
cifs
_i
node
=
CIFS_I
(
inode
);
cifs
_i
node
->
time
=
0
;
/* will force revalidate to get info
when needed */
inode
->
i_ctime
=
current_fs_time
(
sb
);
}
dir
->
i_ctime
=
dir
->
i_mtime
=
current_fs_time
(
sb
);
cifs
I
node
=
CIFS_I
(
dir
);
cifs
_i
node
=
CIFS_I
(
dir
);
CIFS_I
(
dir
)
->
time
=
0
;
/* force revalidate of dir as well */
kfree
(
full_path
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录