Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
cdd09729
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看板
提交
cdd09729
编写于
16年前
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'cleanups' into next
上级
5e4424af
cbc20059
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
26 addition
and
21 deletion
+26
-21
fs/nfs/write.c
fs/nfs/write.c
+19
-15
include/linux/sunrpc/clnt.h
include/linux/sunrpc/clnt.h
+5
-4
net/sunrpc/clnt.c
net/sunrpc/clnt.c
+2
-2
未找到文件。
fs/nfs/write.c
浏览文件 @
cdd09729
...
...
@@ -351,15 +351,13 @@ int nfs_writepages(struct address_space *mapping, struct writeback_control *wbc)
/*
* Insert a write request into an inode
*/
static
int
nfs_inode_add_request
(
struct
inode
*
inode
,
struct
nfs_page
*
req
)
static
void
nfs_inode_add_request
(
struct
inode
*
inode
,
struct
nfs_page
*
req
)
{
struct
nfs_inode
*
nfsi
=
NFS_I
(
inode
);
int
error
;
error
=
radix_tree_insert
(
&
nfsi
->
nfs_page_tree
,
req
->
wb_index
,
req
);
BUG_ON
(
error
==
-
EEXIST
);
if
(
error
)
return
error
;
BUG_ON
(
error
);
if
(
!
nfsi
->
npages
)
{
igrab
(
inode
);
if
(
nfs_have_delegation
(
inode
,
FMODE_WRITE
))
...
...
@@ -369,8 +367,8 @@ static int nfs_inode_add_request(struct inode *inode, struct nfs_page *req)
set_page_private
(
req
->
wb_page
,
(
unsigned
long
)
req
);
nfsi
->
npages
++
;
kref_get
(
&
req
->
wb_kref
);
radix_tree_tag_set
(
&
nfsi
->
nfs_page_tree
,
req
->
wb_index
,
NFS_PAGE_TAG_LOCKED
);
return
0
;
radix_tree_tag_set
(
&
nfsi
->
nfs_page_tree
,
req
->
wb_index
,
NFS_PAGE_TAG_LOCKED
)
;
}
/*
...
...
@@ -582,6 +580,13 @@ static struct nfs_page * nfs_update_request(struct nfs_open_context* ctx,
/* Loop over all inode entries and see if we find
* A request for the page we wish to update
*/
if
(
new
)
{
if
(
radix_tree_preload
(
GFP_NOFS
))
{
nfs_release_request
(
new
);
return
ERR_PTR
(
-
ENOMEM
);
}
}
spin_lock
(
&
inode
->
i_lock
);
req
=
nfs_page_find_request_locked
(
page
);
if
(
req
)
{
...
...
@@ -592,28 +597,27 @@ static struct nfs_page * nfs_update_request(struct nfs_open_context* ctx,
error
=
nfs_wait_on_request
(
req
);
nfs_release_request
(
req
);
if
(
error
<
0
)
{
if
(
new
)
if
(
new
)
{
radix_tree_preload_end
();
nfs_release_request
(
new
);
}
return
ERR_PTR
(
error
);
}
continue
;
}
spin_unlock
(
&
inode
->
i_lock
);
if
(
new
)
if
(
new
)
{
radix_tree_preload_end
();
nfs_release_request
(
new
);
}
break
;
}
if
(
new
)
{
int
error
;
nfs_lock_request_dontget
(
new
);
error
=
nfs_inode_add_request
(
inode
,
new
);
if
(
error
)
{
spin_unlock
(
&
inode
->
i_lock
);
nfs_unlock_request
(
new
);
return
ERR_PTR
(
error
);
}
nfs_inode_add_request
(
inode
,
new
);
spin_unlock
(
&
inode
->
i_lock
);
radix_tree_preload_end
();
req
=
new
;
goto
zero_page
;
}
...
...
This diff is collapsed.
Click to expand it.
include/linux/sunrpc/clnt.h
浏览文件 @
cdd09729
...
...
@@ -127,11 +127,12 @@ int rpcb_getport_sync(struct sockaddr_in *, u32, u32, int);
void
rpcb_getport_async
(
struct
rpc_task
*
);
void
rpc_call_start
(
struct
rpc_task
*
);
int
rpc_call_async
(
struct
rpc_clnt
*
clnt
,
struct
rpc_message
*
msg
,
int
flags
,
const
struct
rpc_call_ops
*
tk_ops
,
int
rpc_call_async
(
struct
rpc_clnt
*
clnt
,
const
struct
rpc_message
*
msg
,
int
flags
,
const
struct
rpc_call_ops
*
tk_ops
,
void
*
calldata
);
int
rpc_call_sync
(
struct
rpc_clnt
*
clnt
,
struct
rpc_message
*
msg
,
int
flags
);
int
rpc_call_sync
(
struct
rpc_clnt
*
clnt
,
const
struct
rpc_message
*
msg
,
int
flags
);
struct
rpc_task
*
rpc_call_null
(
struct
rpc_clnt
*
clnt
,
struct
rpc_cred
*
cred
,
int
flags
);
void
rpc_restart_call
(
struct
rpc_task
*
);
...
...
This diff is collapsed.
Click to expand it.
net/sunrpc/clnt.c
浏览文件 @
cdd09729
...
...
@@ -548,7 +548,7 @@ EXPORT_SYMBOL_GPL(rpc_run_task);
* @msg: RPC call parameters
* @flags: RPC call flags
*/
int
rpc_call_sync
(
struct
rpc_clnt
*
clnt
,
struct
rpc_message
*
msg
,
int
flags
)
int
rpc_call_sync
(
struct
rpc_clnt
*
clnt
,
const
struct
rpc_message
*
msg
,
int
flags
)
{
struct
rpc_task
*
task
;
struct
rpc_task_setup
task_setup_data
=
{
...
...
@@ -579,7 +579,7 @@ EXPORT_SYMBOL_GPL(rpc_call_sync);
* @data: user call data
*/
int
rpc_call_async
(
struct
rpc_clnt
*
clnt
,
struct
rpc_message
*
msg
,
int
flags
,
rpc_call_async
(
struct
rpc_clnt
*
clnt
,
const
struct
rpc_message
*
msg
,
int
flags
,
const
struct
rpc_call_ops
*
tk_ops
,
void
*
data
)
{
struct
rpc_task
*
task
;
...
...
This diff is collapsed.
Click to expand it.
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录
新手
引导
客服
返回
顶部