Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
837f3ec6
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
837f3ec6
编写于
5月 21, 2018
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'work.misc' into work.lookup
上级
baf10564
030c7e0b
变更
12
隐藏空白更改
内联
并排
Showing
12 changed file
with
45 addition
and
98 deletion
+45
-98
fs/dcache.c
fs/dcache.c
+34
-49
fs/fat/namei_msdos.c
fs/fat/namei_msdos.c
+0
-4
fs/fat/namei_vfat.c
fs/fat/namei_vfat.c
+1
-12
fs/namei.c
fs/namei.c
+1
-3
fs/read_write.c
fs/read_write.c
+3
-3
fs/super.c
fs/super.c
+1
-1
fs/xattr.c
fs/xattr.c
+1
-2
include/linux/fs.h
include/linux/fs.h
+1
-1
include/linux/sunrpc/rpc_pipe_fs.h
include/linux/sunrpc/rpc_pipe_fs.h
+0
-2
include/linux/xattr.h
include/linux/xattr.h
+0
-1
net/sunrpc/rpc_pipe.c
net/sunrpc/rpc_pipe.c
+0
-16
security/selinux/hooks.c
security/selinux/hooks.c
+3
-4
未找到文件。
fs/dcache.c
浏览文件 @
837f3ec6
...
...
@@ -907,6 +907,35 @@ struct dentry *dget_parent(struct dentry *dentry)
}
EXPORT_SYMBOL
(
dget_parent
);
static
struct
dentry
*
__d_find_any_alias
(
struct
inode
*
inode
)
{
struct
dentry
*
alias
;
if
(
hlist_empty
(
&
inode
->
i_dentry
))
return
NULL
;
alias
=
hlist_entry
(
inode
->
i_dentry
.
first
,
struct
dentry
,
d_u
.
d_alias
);
__dget
(
alias
);
return
alias
;
}
/**
* d_find_any_alias - find any alias for a given inode
* @inode: inode to find an alias for
*
* If any aliases exist for the given inode, take and return a
* reference for one of them. If no aliases exist, return %NULL.
*/
struct
dentry
*
d_find_any_alias
(
struct
inode
*
inode
)
{
struct
dentry
*
de
;
spin_lock
(
&
inode
->
i_lock
);
de
=
__d_find_any_alias
(
inode
);
spin_unlock
(
&
inode
->
i_lock
);
return
de
;
}
EXPORT_SYMBOL
(
d_find_any_alias
);
/**
* d_find_alias - grab a hashed alias of inode
* @inode: inode in question
...
...
@@ -923,34 +952,19 @@ EXPORT_SYMBOL(dget_parent);
*/
static
struct
dentry
*
__d_find_alias
(
struct
inode
*
inode
)
{
struct
dentry
*
alias
,
*
discon_alias
;
struct
dentry
*
alias
;
if
(
S_ISDIR
(
inode
->
i_mode
))
return
__d_find_any_alias
(
inode
);
again:
discon_alias
=
NULL
;
hlist_for_each_entry
(
alias
,
&
inode
->
i_dentry
,
d_u
.
d_alias
)
{
spin_lock
(
&
alias
->
d_lock
);
if
(
S_ISDIR
(
inode
->
i_mode
)
||
!
d_unhashed
(
alias
))
{
if
(
IS_ROOT
(
alias
)
&&
(
alias
->
d_flags
&
DCACHE_DISCONNECTED
))
{
discon_alias
=
alias
;
}
else
{
__dget_dlock
(
alias
);
spin_unlock
(
&
alias
->
d_lock
);
return
alias
;
}
}
spin_unlock
(
&
alias
->
d_lock
);
}
if
(
discon_alias
)
{
alias
=
discon_alias
;
spin_lock
(
&
alias
->
d_lock
);
if
(
S_ISDIR
(
inode
->
i_mode
)
||
!
d_unhashed
(
alias
))
{
if
(
!
d_unhashed
(
alias
))
{
__dget_dlock
(
alias
);
spin_unlock
(
&
alias
->
d_lock
);
return
alias
;
}
spin_unlock
(
&
alias
->
d_lock
);
goto
again
;
}
return
NULL
;
}
...
...
@@ -1963,35 +1977,6 @@ struct dentry *d_make_root(struct inode *root_inode)
}
EXPORT_SYMBOL
(
d_make_root
);
static
struct
dentry
*
__d_find_any_alias
(
struct
inode
*
inode
)
{
struct
dentry
*
alias
;
if
(
hlist_empty
(
&
inode
->
i_dentry
))
return
NULL
;
alias
=
hlist_entry
(
inode
->
i_dentry
.
first
,
struct
dentry
,
d_u
.
d_alias
);
__dget
(
alias
);
return
alias
;
}
/**
* d_find_any_alias - find any alias for a given inode
* @inode: inode to find an alias for
*
* If any aliases exist for the given inode, take and return a
* reference for one of them. If no aliases exist, return %NULL.
*/
struct
dentry
*
d_find_any_alias
(
struct
inode
*
inode
)
{
struct
dentry
*
de
;
spin_lock
(
&
inode
->
i_lock
);
de
=
__d_find_any_alias
(
inode
);
spin_unlock
(
&
inode
->
i_lock
);
return
de
;
}
EXPORT_SYMBOL
(
d_find_any_alias
);
static
struct
dentry
*
__d_instantiate_anon
(
struct
dentry
*
dentry
,
struct
inode
*
inode
,
bool
disconnected
)
...
...
fs/fat/namei_msdos.c
浏览文件 @
837f3ec6
...
...
@@ -314,10 +314,6 @@ static int msdos_rmdir(struct inode *dir, struct dentry *dentry)
int
err
;
mutex_lock
(
&
MSDOS_SB
(
sb
)
->
s_lock
);
/*
* Check whether the directory is not in use, then check
* whether it is empty.
*/
err
=
fat_dir_empty
(
inode
);
if
(
err
)
goto
out
;
...
...
fs/fat/namei_vfat.c
浏览文件 @
837f3ec6
...
...
@@ -697,15 +697,6 @@ static int vfat_find(struct inode *dir, const struct qstr *qname,
return
fat_search_long
(
dir
,
qname
->
name
,
len
,
sinfo
);
}
/*
* (nfsd's) anonymous disconnected dentry?
* NOTE: !IS_ROOT() is not anonymous (I.e. d_splice_alias() did the job).
*/
static
int
vfat_d_anon_disconn
(
struct
dentry
*
dentry
)
{
return
IS_ROOT
(
dentry
)
&&
(
dentry
->
d_flags
&
DCACHE_DISCONNECTED
);
}
static
struct
dentry
*
vfat_lookup
(
struct
inode
*
dir
,
struct
dentry
*
dentry
,
unsigned
int
flags
)
{
...
...
@@ -738,8 +729,7 @@ static struct dentry *vfat_lookup(struct inode *dir, struct dentry *dentry,
* Checking "alias->d_parent == dentry->d_parent" to make sure
* FS is not corrupted (especially double linked dir).
*/
if
(
alias
&&
alias
->
d_parent
==
dentry
->
d_parent
&&
!
vfat_d_anon_disconn
(
alias
))
{
if
(
alias
&&
alias
->
d_parent
==
dentry
->
d_parent
)
{
/*
* This inode has non anonymous-DCACHE_DISCONNECTED
* dentry. This means, the user did ->lookup() by an
...
...
@@ -747,7 +737,6 @@ static struct dentry *vfat_lookup(struct inode *dir, struct dentry *dentry,
*
* Switch to new one for reason of locality if possible.
*/
BUG_ON
(
d_unhashed
(
alias
));
if
(
!
S_ISDIR
(
inode
->
i_mode
))
d_move
(
alias
,
dentry
);
iput
(
inode
);
...
...
fs/namei.c
浏览文件 @
837f3ec6
...
...
@@ -1438,10 +1438,8 @@ static int path_parent_directory(struct path *path)
static
int
follow_dotdot
(
struct
nameidata
*
nd
)
{
while
(
1
)
{
if
(
nd
->
path
.
dentry
==
nd
->
root
.
dentry
&&
nd
->
path
.
mnt
==
nd
->
root
.
mnt
)
{
if
(
path_equal
(
&
nd
->
path
,
&
nd
->
root
))
break
;
}
if
(
nd
->
path
.
dentry
!=
nd
->
path
.
mnt
->
mnt_root
)
{
int
ret
=
path_parent_directory
(
&
nd
->
path
);
if
(
ret
)
...
...
fs/read_write.c
浏览文件 @
837f3ec6
...
...
@@ -2023,7 +2023,7 @@ int vfs_dedupe_file_range(struct file *file, struct file_dedupe_range *same)
ret
=
mnt_want_write_file
(
dst_file
);
if
(
ret
)
{
info
->
status
=
ret
;
goto
next_
loop
;
goto
next_
fdput
;
}
dst_off
=
info
->
dest_offset
;
...
...
@@ -2058,9 +2058,9 @@ int vfs_dedupe_file_range(struct file *file, struct file_dedupe_range *same)
next_file:
mnt_drop_write_file
(
dst_file
);
next_
loop
:
next_
fdput
:
fdput
(
dst_fd
);
next_loop:
if
(
fatal_signal_pending
(
current
))
goto
out
;
}
...
...
fs/super.c
浏览文件 @
837f3ec6
...
...
@@ -947,7 +947,7 @@ void emergency_remount(void)
static
void
do_thaw_all_callback
(
struct
super_block
*
sb
)
{
down_write
(
&
sb
->
s_umount
);
if
(
sb
->
s_root
&&
sb
->
s_flags
&
MS
_BORN
)
{
if
(
sb
->
s_root
&&
sb
->
s_flags
&
SB
_BORN
)
{
emergency_thaw_bdev
(
sb
);
thaw_super_locked
(
sb
);
}
else
{
...
...
fs/xattr.c
浏览文件 @
837f3ec6
...
...
@@ -229,7 +229,7 @@ vfs_setxattr(struct dentry *dentry, const char *name, const void *value,
}
EXPORT_SYMBOL_GPL
(
vfs_setxattr
);
ssize_t
s
tatic
s
size_t
xattr_getsecurity
(
struct
inode
*
inode
,
const
char
*
name
,
void
*
value
,
size_t
size
)
{
...
...
@@ -254,7 +254,6 @@ xattr_getsecurity(struct inode *inode, const char *name, void *value,
out_noalloc:
return
len
;
}
EXPORT_SYMBOL_GPL
(
xattr_getsecurity
);
/*
* vfs_getxattr_alloc - allocate memory, if necessary, before calling getxattr
...
...
include/linux/fs.h
浏览文件 @
837f3ec6
...
...
@@ -94,7 +94,7 @@ typedef int (dio_iodone_t)(struct kiocb *iocb, loff_t offset,
/*
* flags in file.f_mode. Note that FMODE_READ and FMODE_WRITE must correspond
* to O_WRONLY and O_RDWR via the strange trick in
_
_dentry_open()
* to O_WRONLY and O_RDWR via the strange trick in
do
_dentry_open()
*/
/* file is open for reading */
...
...
include/linux/sunrpc/rpc_pipe_fs.h
浏览文件 @
837f3ec6
...
...
@@ -122,8 +122,6 @@ extern struct dentry *rpc_create_cache_dir(struct dentry *,
struct
cache_detail
*
);
extern
void
rpc_remove_cache_dir
(
struct
dentry
*
);
extern
int
rpc_rmdir
(
struct
dentry
*
dentry
);
struct
rpc_pipe
*
rpc_mkpipe_data
(
const
struct
rpc_pipe_ops
*
ops
,
int
flags
);
void
rpc_destroy_pipe_data
(
struct
rpc_pipe
*
pipe
);
extern
struct
dentry
*
rpc_mkpipe_dentry
(
struct
dentry
*
,
const
char
*
,
void
*
,
...
...
include/linux/xattr.h
浏览文件 @
837f3ec6
...
...
@@ -46,7 +46,6 @@ struct xattr {
size_t
value_len
;
};
ssize_t
xattr_getsecurity
(
struct
inode
*
,
const
char
*
,
void
*
,
size_t
);
ssize_t
__vfs_getxattr
(
struct
dentry
*
,
struct
inode
*
,
const
char
*
,
void
*
,
size_t
);
ssize_t
vfs_getxattr
(
struct
dentry
*
,
const
char
*
,
void
*
,
size_t
);
ssize_t
vfs_listxattr
(
struct
dentry
*
d
,
char
*
list
,
size_t
size
);
...
...
net/sunrpc/rpc_pipe.c
浏览文件 @
837f3ec6
...
...
@@ -609,22 +609,6 @@ static int __rpc_rmdir(struct inode *dir, struct dentry *dentry)
return
ret
;
}
int
rpc_rmdir
(
struct
dentry
*
dentry
)
{
struct
dentry
*
parent
;
struct
inode
*
dir
;
int
error
;
parent
=
dget_parent
(
dentry
);
dir
=
d_inode
(
parent
);
inode_lock_nested
(
dir
,
I_MUTEX_PARENT
);
error
=
__rpc_rmdir
(
dir
,
dentry
);
inode_unlock
(
dir
);
dput
(
parent
);
return
error
;
}
EXPORT_SYMBOL_GPL
(
rpc_rmdir
);
static
int
__rpc_unlink
(
struct
inode
*
dir
,
struct
dentry
*
dentry
)
{
int
ret
;
...
...
security/selinux/hooks.c
浏览文件 @
837f3ec6
...
...
@@ -274,11 +274,10 @@ static int inode_doinit_with_dentry(struct inode *inode, struct dentry *opt_dent
* Try reloading inode security labels that have been marked as invalid. The
* @may_sleep parameter indicates when sleeping and thus reloading labels is
* allowed; when set to false, returns -ECHILD when the label is
* invalid. The @opt_dentry parameter should be set to a dentry of the inode;
* when no dentry is available, set it to NULL instead.
* invalid. The @dentry parameter should be set to a dentry of the inode.
*/
static
int
__inode_security_revalidate
(
struct
inode
*
inode
,
struct
dentry
*
opt_
dentry
,
struct
dentry
*
dentry
,
bool
may_sleep
)
{
struct
inode_security_struct
*
isec
=
inode
->
i_security
;
...
...
@@ -295,7 +294,7 @@ static int __inode_security_revalidate(struct inode *inode,
* @opt_dentry is NULL and no dentry for this inode can be
* found; in that case, continue using the old label.
*/
inode_doinit_with_dentry
(
inode
,
opt_
dentry
);
inode_doinit_with_dentry
(
inode
,
dentry
);
}
return
0
;
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录