Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
a218d0fd
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
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看板
提交
a218d0fd
编写于
11月 21, 2011
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
switch open and mkdir syscalls to umode_t
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
04fc66e7
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
21 addition
and
21 deletion
+21
-21
fs/compat.c
fs/compat.c
+2
-2
fs/internal.h
fs/internal.h
+1
-1
fs/namei.c
fs/namei.c
+3
-3
fs/open.c
fs/open.c
+6
-6
include/linux/compat.h
include/linux/compat.h
+2
-2
include/linux/fs.h
include/linux/fs.h
+2
-2
include/linux/syscalls.h
include/linux/syscalls.h
+5
-5
未找到文件。
fs/compat.c
浏览文件 @
a218d0fd
...
...
@@ -1281,7 +1281,7 @@ compat_sys_vmsplice(int fd, const struct compat_iovec __user *iov32,
* O_LARGEFILE flag.
*/
asmlinkage
long
compat_sys_open
(
const
char
__user
*
filename
,
int
flags
,
in
t
mode
)
compat_sys_open
(
const
char
__user
*
filename
,
int
flags
,
umode_
t
mode
)
{
return
do_sys_open
(
AT_FDCWD
,
filename
,
flags
,
mode
);
}
...
...
@@ -1291,7 +1291,7 @@ compat_sys_open(const char __user *filename, int flags, int mode)
* O_LARGEFILE flag.
*/
asmlinkage
long
compat_sys_openat
(
unsigned
int
dfd
,
const
char
__user
*
filename
,
int
flags
,
in
t
mode
)
compat_sys_openat
(
unsigned
int
dfd
,
const
char
__user
*
filename
,
int
flags
,
umode_
t
mode
)
{
return
do_sys_open
(
dfd
,
filename
,
flags
,
mode
);
}
...
...
fs/internal.h
浏览文件 @
a218d0fd
...
...
@@ -88,7 +88,7 @@ extern struct file *nameidata_to_filp(struct nameidata *);
extern
void
release_open_intent
(
struct
nameidata
*
);
struct
open_flags
{
int
open_flag
;
in
t
mode
;
umode_
t
mode
;
int
acc_mode
;
int
intent
;
};
...
...
fs/namei.c
浏览文件 @
a218d0fd
...
...
@@ -2177,7 +2177,7 @@ static struct file *do_last(struct nameidata *nd, struct path *path,
/* Negative dentry, just create the file */
if
(
!
dentry
->
d_inode
)
{
in
t
mode
=
op
->
mode
;
umode_
t
mode
=
op
->
mode
;
if
(
!
IS_POSIXACL
(
dir
->
d_inode
))
mode
&=
~
current_umask
();
/*
...
...
@@ -2562,7 +2562,7 @@ int vfs_mkdir(struct inode *dir, struct dentry *dentry, umode_t mode)
return
error
;
}
SYSCALL_DEFINE3
(
mkdirat
,
int
,
dfd
,
const
char
__user
*
,
pathname
,
in
t
,
mode
)
SYSCALL_DEFINE3
(
mkdirat
,
int
,
dfd
,
const
char
__user
*
,
pathname
,
umode_
t
,
mode
)
{
struct
dentry
*
dentry
;
struct
path
path
;
...
...
@@ -2590,7 +2590,7 @@ SYSCALL_DEFINE3(mkdirat, int, dfd, const char __user *, pathname, int, mode)
return
error
;
}
SYSCALL_DEFINE2
(
mkdir
,
const
char
__user
*
,
pathname
,
in
t
,
mode
)
SYSCALL_DEFINE2
(
mkdir
,
const
char
__user
*
,
pathname
,
umode_
t
,
mode
)
{
return
sys_mkdirat
(
AT_FDCWD
,
pathname
,
mode
);
}
...
...
fs/open.c
浏览文件 @
a218d0fd
...
...
@@ -877,7 +877,7 @@ void fd_install(unsigned int fd, struct file *file)
EXPORT_SYMBOL
(
fd_install
);
static
inline
int
build_open_flags
(
int
flags
,
in
t
mode
,
struct
open_flags
*
op
)
static
inline
int
build_open_flags
(
int
flags
,
umode_
t
mode
,
struct
open_flags
*
op
)
{
int
lookup_flags
=
0
;
int
acc_mode
;
...
...
@@ -948,7 +948,7 @@ static inline int build_open_flags(int flags, int mode, struct open_flags *op)
* have to. But in generally you should not do this, so please move
* along, nothing to see here..
*/
struct
file
*
filp_open
(
const
char
*
filename
,
int
flags
,
in
t
mode
)
struct
file
*
filp_open
(
const
char
*
filename
,
int
flags
,
umode_
t
mode
)
{
struct
open_flags
op
;
int
lookup
=
build_open_flags
(
flags
,
mode
,
&
op
);
...
...
@@ -970,7 +970,7 @@ struct file *file_open_root(struct dentry *dentry, struct vfsmount *mnt,
}
EXPORT_SYMBOL
(
file_open_root
);
long
do_sys_open
(
int
dfd
,
const
char
__user
*
filename
,
int
flags
,
in
t
mode
)
long
do_sys_open
(
int
dfd
,
const
char
__user
*
filename
,
int
flags
,
umode_
t
mode
)
{
struct
open_flags
op
;
int
lookup
=
build_open_flags
(
flags
,
mode
,
&
op
);
...
...
@@ -994,7 +994,7 @@ long do_sys_open(int dfd, const char __user *filename, int flags, int mode)
return
fd
;
}
SYSCALL_DEFINE3
(
open
,
const
char
__user
*
,
filename
,
int
,
flags
,
in
t
,
mode
)
SYSCALL_DEFINE3
(
open
,
const
char
__user
*
,
filename
,
int
,
flags
,
umode_
t
,
mode
)
{
long
ret
;
...
...
@@ -1008,7 +1008,7 @@ SYSCALL_DEFINE3(open, const char __user *, filename, int, flags, int, mode)
}
SYSCALL_DEFINE4
(
openat
,
int
,
dfd
,
const
char
__user
*
,
filename
,
int
,
flags
,
in
t
,
mode
)
umode_
t
,
mode
)
{
long
ret
;
...
...
@@ -1027,7 +1027,7 @@ SYSCALL_DEFINE4(openat, int, dfd, const char __user *, filename, int, flags,
* For backward compatibility? Maybe this should be moved
* into arch/i386 instead?
*/
SYSCALL_DEFINE2
(
creat
,
const
char
__user
*
,
pathname
,
in
t
,
mode
)
SYSCALL_DEFINE2
(
creat
,
const
char
__user
*
,
pathname
,
umode_
t
,
mode
)
{
return
sys_open
(
pathname
,
O_CREAT
|
O_WRONLY
|
O_TRUNC
,
mode
);
}
...
...
include/linux/compat.h
浏览文件 @
a218d0fd
...
...
@@ -422,9 +422,9 @@ asmlinkage long compat_sys_getdents64(unsigned int fd,
asmlinkage
long
compat_sys_vmsplice
(
int
fd
,
const
struct
compat_iovec
__user
*
,
unsigned
int
nr_segs
,
unsigned
int
flags
);
asmlinkage
long
compat_sys_open
(
const
char
__user
*
filename
,
int
flags
,
in
t
mode
);
umode_
t
mode
);
asmlinkage
long
compat_sys_openat
(
unsigned
int
dfd
,
const
char
__user
*
filename
,
int
flags
,
in
t
mode
);
int
flags
,
umode_
t
mode
);
asmlinkage
long
compat_sys_open_by_handle_at
(
int
mountdirfd
,
struct
file_handle
__user
*
handle
,
int
flags
);
...
...
include/linux/fs.h
浏览文件 @
a218d0fd
...
...
@@ -2054,8 +2054,8 @@ extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs,
extern
int
do_fallocate
(
struct
file
*
file
,
int
mode
,
loff_t
offset
,
loff_t
len
);
extern
long
do_sys_open
(
int
dfd
,
const
char
__user
*
filename
,
int
flags
,
in
t
mode
);
extern
struct
file
*
filp_open
(
const
char
*
,
int
,
in
t
);
umode_
t
mode
);
extern
struct
file
*
filp_open
(
const
char
*
,
int
,
umode_
t
);
extern
struct
file
*
file_open_root
(
struct
dentry
*
,
struct
vfsmount
*
,
const
char
*
,
int
);
extern
struct
file
*
dentry_open
(
struct
dentry
*
,
struct
vfsmount
*
,
int
,
...
...
include/linux/syscalls.h
浏览文件 @
a218d0fd
...
...
@@ -517,9 +517,9 @@ asmlinkage long sys_sendfile64(int out_fd, int in_fd,
loff_t
__user
*
offset
,
size_t
count
);
asmlinkage
long
sys_readlink
(
const
char
__user
*
path
,
char
__user
*
buf
,
int
bufsiz
);
asmlinkage
long
sys_creat
(
const
char
__user
*
pathname
,
in
t
mode
);
asmlinkage
long
sys_creat
(
const
char
__user
*
pathname
,
umode_
t
mode
);
asmlinkage
long
sys_open
(
const
char
__user
*
filename
,
int
flags
,
in
t
mode
);
int
flags
,
umode_
t
mode
);
asmlinkage
long
sys_close
(
unsigned
int
fd
);
asmlinkage
long
sys_access
(
const
char
__user
*
filename
,
int
mode
);
asmlinkage
long
sys_vhangup
(
void
);
...
...
@@ -582,7 +582,7 @@ asmlinkage long sys_preadv(unsigned long fd, const struct iovec __user *vec,
asmlinkage
long
sys_pwritev
(
unsigned
long
fd
,
const
struct
iovec
__user
*
vec
,
unsigned
long
vlen
,
unsigned
long
pos_l
,
unsigned
long
pos_h
);
asmlinkage
long
sys_getcwd
(
char
__user
*
buf
,
unsigned
long
size
);
asmlinkage
long
sys_mkdir
(
const
char
__user
*
pathname
,
in
t
mode
);
asmlinkage
long
sys_mkdir
(
const
char
__user
*
pathname
,
umode_
t
mode
);
asmlinkage
long
sys_chdir
(
const
char
__user
*
filename
);
asmlinkage
long
sys_fchdir
(
unsigned
int
fd
);
asmlinkage
long
sys_rmdir
(
const
char
__user
*
pathname
);
...
...
@@ -757,7 +757,7 @@ asmlinkage long sys_spu_create(const char __user *name,
asmlinkage
long
sys_mknodat
(
int
dfd
,
const
char
__user
*
filename
,
umode_t
mode
,
unsigned
dev
);
asmlinkage
long
sys_mkdirat
(
int
dfd
,
const
char
__user
*
pathname
,
in
t
mode
);
asmlinkage
long
sys_mkdirat
(
int
dfd
,
const
char
__user
*
pathname
,
umode_
t
mode
);
asmlinkage
long
sys_unlinkat
(
int
dfd
,
const
char
__user
*
pathname
,
int
flag
);
asmlinkage
long
sys_symlinkat
(
const
char
__user
*
oldname
,
int
newdfd
,
const
char
__user
*
newname
);
...
...
@@ -773,7 +773,7 @@ asmlinkage long sys_fchmodat(int dfd, const char __user * filename,
asmlinkage
long
sys_fchownat
(
int
dfd
,
const
char
__user
*
filename
,
uid_t
user
,
gid_t
group
,
int
flag
);
asmlinkage
long
sys_openat
(
int
dfd
,
const
char
__user
*
filename
,
int
flags
,
in
t
mode
);
umode_
t
mode
);
asmlinkage
long
sys_newfstatat
(
int
dfd
,
const
char
__user
*
filename
,
struct
stat
__user
*
statbuf
,
int
flag
);
asmlinkage
long
sys_fstatat64
(
int
dfd
,
const
char
__user
*
filename
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录