Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
1b370bc2
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看板
提交
1b370bc2
编写于
7月 07, 2007
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NFSv4: Allow nfs4_opendata_to_nfs4_state to return errors.
Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
6f43ddcc
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
18 addition
and
11 deletion
+18
-11
fs/nfs/nfs4proc.c
fs/nfs/nfs4proc.c
+18
-11
未找到文件。
fs/nfs/nfs4proc.c
浏览文件 @
1b370bc2
...
@@ -385,15 +385,19 @@ static struct nfs4_state *nfs4_opendata_to_nfs4_state(struct nfs4_opendata *data
...
@@ -385,15 +385,19 @@ static struct nfs4_state *nfs4_opendata_to_nfs4_state(struct nfs4_opendata *data
struct
nfs4_state
*
state
=
NULL
;
struct
nfs4_state
*
state
=
NULL
;
struct
nfs_delegation
*
delegation
;
struct
nfs_delegation
*
delegation
;
nfs4_stateid
*
deleg_stateid
=
NULL
;
nfs4_stateid
*
deleg_stateid
=
NULL
;
int
ret
;
ret
=
-
EAGAIN
;
if
(
!
(
data
->
f_attr
.
valid
&
NFS_ATTR_FATTR
))
if
(
!
(
data
->
f_attr
.
valid
&
NFS_ATTR_FATTR
))
goto
out
;
goto
err
;
inode
=
nfs_fhget
(
data
->
dir
->
d_sb
,
&
data
->
o_res
.
fh
,
&
data
->
f_attr
);
inode
=
nfs_fhget
(
data
->
dir
->
d_sb
,
&
data
->
o_res
.
fh
,
&
data
->
f_attr
);
ret
=
PTR_ERR
(
inode
);
if
(
IS_ERR
(
inode
))
if
(
IS_ERR
(
inode
))
goto
out
;
goto
err
;
ret
=
-
ENOMEM
;
state
=
nfs4_get_open_state
(
inode
,
data
->
owner
);
state
=
nfs4_get_open_state
(
inode
,
data
->
owner
);
if
(
state
==
NULL
)
if
(
state
==
NULL
)
goto
put_inode
;
goto
err_
put_inode
;
if
(
data
->
o_res
.
delegation_type
!=
0
)
{
if
(
data
->
o_res
.
delegation_type
!=
0
)
{
int
delegation_flags
=
0
;
int
delegation_flags
=
0
;
...
@@ -417,10 +421,12 @@ static struct nfs4_state *nfs4_opendata_to_nfs4_state(struct nfs4_opendata *data
...
@@ -417,10 +421,12 @@ static struct nfs4_state *nfs4_opendata_to_nfs4_state(struct nfs4_opendata *data
deleg_stateid
=
&
delegation
->
stateid
;
deleg_stateid
=
&
delegation
->
stateid
;
update_open_stateid
(
state
,
&
data
->
o_res
.
stateid
,
deleg_stateid
,
data
->
o_arg
.
open_flags
);
update_open_stateid
(
state
,
&
data
->
o_res
.
stateid
,
deleg_stateid
,
data
->
o_arg
.
open_flags
);
rcu_read_unlock
();
rcu_read_unlock
();
put_inode:
iput
(
inode
);
iput
(
inode
);
out:
return
state
;
return
state
;
err_put_inode:
iput
(
inode
);
err:
return
ERR_PTR
(
ret
);
}
}
static
struct
nfs_open_context
*
nfs4_state_find_open_context
(
struct
nfs4_state
*
state
)
static
struct
nfs_open_context
*
nfs4_state_find_open_context
(
struct
nfs4_state
*
state
)
...
@@ -453,8 +459,9 @@ static int nfs4_open_recover_helper(struct nfs4_opendata *opendata, mode_t openf
...
@@ -453,8 +459,9 @@ static int nfs4_open_recover_helper(struct nfs4_opendata *opendata, mode_t openf
if
(
ret
!=
0
)
if
(
ret
!=
0
)
return
ret
;
return
ret
;
newstate
=
nfs4_opendata_to_nfs4_state
(
opendata
);
newstate
=
nfs4_opendata_to_nfs4_state
(
opendata
);
if
(
newstate
!=
NULL
)
if
(
IS_ERR
(
newstate
))
nfs4_close_state
(
&
opendata
->
path
,
newstate
,
openflags
);
return
PTR_ERR
(
newstate
);
nfs4_close_state
(
&
opendata
->
path
,
newstate
,
openflags
);
*
res
=
newstate
;
*
res
=
newstate
;
return
0
;
return
0
;
}
}
...
@@ -631,7 +638,7 @@ static void nfs4_open_confirm_release(void *calldata)
...
@@ -631,7 +638,7 @@ static void nfs4_open_confirm_release(void *calldata)
goto
out_free
;
goto
out_free
;
nfs_confirm_seqid
(
&
data
->
owner
->
so_seqid
,
0
);
nfs_confirm_seqid
(
&
data
->
owner
->
so_seqid
,
0
);
state
=
nfs4_opendata_to_nfs4_state
(
data
);
state
=
nfs4_opendata_to_nfs4_state
(
data
);
if
(
state
!=
NULL
)
if
(
!
IS_ERR
(
state
)
)
nfs4_close_state
(
&
data
->
path
,
state
,
data
->
o_arg
.
open_flags
);
nfs4_close_state
(
&
data
->
path
,
state
,
data
->
o_arg
.
open_flags
);
out_free:
out_free:
nfs4_opendata_put
(
data
);
nfs4_opendata_put
(
data
);
...
@@ -736,7 +743,7 @@ static void nfs4_open_release(void *calldata)
...
@@ -736,7 +743,7 @@ static void nfs4_open_release(void *calldata)
goto
out_free
;
goto
out_free
;
nfs_confirm_seqid
(
&
data
->
owner
->
so_seqid
,
0
);
nfs_confirm_seqid
(
&
data
->
owner
->
so_seqid
,
0
);
state
=
nfs4_opendata_to_nfs4_state
(
data
);
state
=
nfs4_opendata_to_nfs4_state
(
data
);
if
(
state
!=
NULL
)
if
(
!
IS_ERR
(
state
)
)
nfs4_close_state
(
&
data
->
path
,
state
,
data
->
o_arg
.
open_flags
);
nfs4_close_state
(
&
data
->
path
,
state
,
data
->
o_arg
.
open_flags
);
out_free:
out_free:
nfs4_opendata_put
(
data
);
nfs4_opendata_put
(
data
);
...
@@ -1036,9 +1043,9 @@ static int _nfs4_do_open(struct inode *dir, struct path *path, int flags, struct
...
@@ -1036,9 +1043,9 @@ static int _nfs4_do_open(struct inode *dir, struct path *path, int flags, struct
if
(
opendata
->
o_arg
.
open_flags
&
O_EXCL
)
if
(
opendata
->
o_arg
.
open_flags
&
O_EXCL
)
nfs4_exclusive_attrset
(
opendata
,
sattr
);
nfs4_exclusive_attrset
(
opendata
,
sattr
);
status
=
-
ENOMEM
;
state
=
nfs4_opendata_to_nfs4_state
(
opendata
);
state
=
nfs4_opendata_to_nfs4_state
(
opendata
);
if
(
state
==
NULL
)
status
=
PTR_ERR
(
state
);
if
(
IS_ERR
(
state
))
goto
err_opendata_put
;
goto
err_opendata_put
;
nfs4_opendata_put
(
opendata
);
nfs4_opendata_put
(
opendata
);
nfs4_put_state_owner
(
sp
);
nfs4_put_state_owner
(
sp
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录