Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
a6a9f18f
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看板
提交
a6a9f18f
编写于
9月 16, 2013
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
nfsd: switch to %p[dD]
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
6de1472f
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
31 addition
and
37 deletion
+31
-37
fs/nfsd/nfs4recover.c
fs/nfsd/nfs4recover.c
+6
-6
fs/nfsd/nfs4state.c
fs/nfsd/nfs4state.c
+6
-9
fs/nfsd/nfsfh.c
fs/nfsd/nfsfh.c
+13
-15
fs/nfsd/nfsfh.h
fs/nfsd/nfsfh.h
+2
-2
fs/nfsd/vfs.c
fs/nfsd/vfs.c
+4
-5
未找到文件。
fs/nfsd/nfs4recover.c
浏览文件 @
a6a9f18f
...
@@ -385,8 +385,8 @@ purge_old(struct dentry *parent, struct dentry *child, struct nfsd_net *nn)
...
@@ -385,8 +385,8 @@ purge_old(struct dentry *parent, struct dentry *child, struct nfsd_net *nn)
status
=
vfs_rmdir
(
parent
->
d_inode
,
child
);
status
=
vfs_rmdir
(
parent
->
d_inode
,
child
);
if
(
status
)
if
(
status
)
printk
(
"failed to remove client recovery directory %
s
\n
"
,
printk
(
"failed to remove client recovery directory %
pd
\n
"
,
child
->
d_name
.
name
);
child
);
/* Keep trying, success or failure: */
/* Keep trying, success or failure: */
return
0
;
return
0
;
}
}
...
@@ -410,15 +410,15 @@ nfsd4_recdir_purge_old(struct nfsd_net *nn, time_t boot_time)
...
@@ -410,15 +410,15 @@ nfsd4_recdir_purge_old(struct nfsd_net *nn, time_t boot_time)
nfs4_release_reclaim
(
nn
);
nfs4_release_reclaim
(
nn
);
if
(
status
)
if
(
status
)
printk
(
"nfsd4: failed to purge old clients from recovery"
printk
(
"nfsd4: failed to purge old clients from recovery"
" directory %
s
\n
"
,
nn
->
rec_file
->
f_path
.
dentry
->
d_name
.
nam
e
);
" directory %
pD
\n
"
,
nn
->
rec_fil
e
);
}
}
static
int
static
int
load_recdir
(
struct
dentry
*
parent
,
struct
dentry
*
child
,
struct
nfsd_net
*
nn
)
load_recdir
(
struct
dentry
*
parent
,
struct
dentry
*
child
,
struct
nfsd_net
*
nn
)
{
{
if
(
child
->
d_name
.
len
!=
HEXDIR_LEN
-
1
)
{
if
(
child
->
d_name
.
len
!=
HEXDIR_LEN
-
1
)
{
printk
(
"nfsd4: illegal name %
s
in recovery directory
\n
"
,
printk
(
"nfsd4: illegal name %
pd
in recovery directory
\n
"
,
child
->
d_name
.
name
);
child
);
/* Keep trying; maybe the others are OK: */
/* Keep trying; maybe the others are OK: */
return
0
;
return
0
;
}
}
...
@@ -437,7 +437,7 @@ nfsd4_recdir_load(struct net *net) {
...
@@ -437,7 +437,7 @@ nfsd4_recdir_load(struct net *net) {
status
=
nfsd4_list_rec_dir
(
load_recdir
,
nn
);
status
=
nfsd4_list_rec_dir
(
load_recdir
,
nn
);
if
(
status
)
if
(
status
)
printk
(
"nfsd4: failed loading clients from recovery"
printk
(
"nfsd4: failed loading clients from recovery"
" directory %
s
\n
"
,
nn
->
rec_file
->
f_path
.
dentry
->
d_name
.
nam
e
);
" directory %
pD
\n
"
,
nn
->
rec_fil
e
);
return
status
;
return
status
;
}
}
...
...
fs/nfsd/nfs4state.c
浏览文件 @
a6a9f18f
...
@@ -3843,9 +3843,8 @@ nfsd4_open_confirm(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
...
@@ -3843,9 +3843,8 @@ nfsd4_open_confirm(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
struct
nfs4_ol_stateid
*
stp
;
struct
nfs4_ol_stateid
*
stp
;
struct
nfsd_net
*
nn
=
net_generic
(
SVC_NET
(
rqstp
),
nfsd_net_id
);
struct
nfsd_net
*
nn
=
net_generic
(
SVC_NET
(
rqstp
),
nfsd_net_id
);
dprintk
(
"NFSD: nfsd4_open_confirm on file %.*s
\n
"
,
dprintk
(
"NFSD: nfsd4_open_confirm on file %pd
\n
"
,
(
int
)
cstate
->
current_fh
.
fh_dentry
->
d_name
.
len
,
cstate
->
current_fh
.
fh_dentry
);
cstate
->
current_fh
.
fh_dentry
->
d_name
.
name
);
status
=
fh_verify
(
rqstp
,
&
cstate
->
current_fh
,
S_IFREG
,
0
);
status
=
fh_verify
(
rqstp
,
&
cstate
->
current_fh
,
S_IFREG
,
0
);
if
(
status
)
if
(
status
)
...
@@ -3922,9 +3921,8 @@ nfsd4_open_downgrade(struct svc_rqst *rqstp,
...
@@ -3922,9 +3921,8 @@ nfsd4_open_downgrade(struct svc_rqst *rqstp,
struct
nfs4_ol_stateid
*
stp
;
struct
nfs4_ol_stateid
*
stp
;
struct
nfsd_net
*
nn
=
net_generic
(
SVC_NET
(
rqstp
),
nfsd_net_id
);
struct
nfsd_net
*
nn
=
net_generic
(
SVC_NET
(
rqstp
),
nfsd_net_id
);
dprintk
(
"NFSD: nfsd4_open_downgrade on file %.*s
\n
"
,
dprintk
(
"NFSD: nfsd4_open_downgrade on file %pd
\n
"
,
(
int
)
cstate
->
current_fh
.
fh_dentry
->
d_name
.
len
,
cstate
->
current_fh
.
fh_dentry
);
cstate
->
current_fh
.
fh_dentry
->
d_name
.
name
);
/* We don't yet support WANT bits: */
/* We don't yet support WANT bits: */
if
(
od
->
od_deleg_want
)
if
(
od
->
od_deleg_want
)
...
@@ -3980,9 +3978,8 @@ nfsd4_close(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
...
@@ -3980,9 +3978,8 @@ nfsd4_close(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate,
struct
net
*
net
=
SVC_NET
(
rqstp
);
struct
net
*
net
=
SVC_NET
(
rqstp
);
struct
nfsd_net
*
nn
=
net_generic
(
net
,
nfsd_net_id
);
struct
nfsd_net
*
nn
=
net_generic
(
net
,
nfsd_net_id
);
dprintk
(
"NFSD: nfsd4_close on file %.*s
\n
"
,
dprintk
(
"NFSD: nfsd4_close on file %pd
\n
"
,
(
int
)
cstate
->
current_fh
.
fh_dentry
->
d_name
.
len
,
cstate
->
current_fh
.
fh_dentry
);
cstate
->
current_fh
.
fh_dentry
->
d_name
.
name
);
nfs4_lock_state
();
nfs4_lock_state
();
status
=
nfs4_preprocess_seqid_op
(
cstate
,
close
->
cl_seqid
,
status
=
nfs4_preprocess_seqid_op
(
cstate
,
close
->
cl_seqid
,
...
...
fs/nfsd/nfsfh.c
浏览文件 @
a6a9f18f
...
@@ -47,7 +47,7 @@ static int nfsd_acceptable(void *expv, struct dentry *dentry)
...
@@ -47,7 +47,7 @@ static int nfsd_acceptable(void *expv, struct dentry *dentry)
tdentry
=
parent
;
tdentry
=
parent
;
}
}
if
(
tdentry
!=
exp
->
ex_path
.
dentry
)
if
(
tdentry
!=
exp
->
ex_path
.
dentry
)
dprintk
(
"nfsd_acceptable failed at %p %
s
\n
"
,
tdentry
,
tdentry
->
d_name
.
name
);
dprintk
(
"nfsd_acceptable failed at %p %
pd
\n
"
,
tdentry
,
tdentry
);
rv
=
(
tdentry
==
exp
->
ex_path
.
dentry
);
rv
=
(
tdentry
==
exp
->
ex_path
.
dentry
);
dput
(
tdentry
);
dput
(
tdentry
);
return
rv
;
return
rv
;
...
@@ -253,8 +253,8 @@ static __be32 nfsd_set_fh_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp)
...
@@ -253,8 +253,8 @@ static __be32 nfsd_set_fh_dentry(struct svc_rqst *rqstp, struct svc_fh *fhp)
if
(
S_ISDIR
(
dentry
->
d_inode
->
i_mode
)
&&
if
(
S_ISDIR
(
dentry
->
d_inode
->
i_mode
)
&&
(
dentry
->
d_flags
&
DCACHE_DISCONNECTED
))
{
(
dentry
->
d_flags
&
DCACHE_DISCONNECTED
))
{
printk
(
"nfsd: find_fh_dentry returned a DISCONNECTED directory: %
s/%s
\n
"
,
printk
(
"nfsd: find_fh_dentry returned a DISCONNECTED directory: %
pd2
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
);
dentry
);
}
}
fhp
->
fh_dentry
=
dentry
;
fhp
->
fh_dentry
=
dentry
;
...
@@ -361,10 +361,9 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type, int access)
...
@@ -361,10 +361,9 @@ fh_verify(struct svc_rqst *rqstp, struct svc_fh *fhp, umode_t type, int access)
error
=
nfsd_permission
(
rqstp
,
exp
,
dentry
,
access
);
error
=
nfsd_permission
(
rqstp
,
exp
,
dentry
,
access
);
if
(
error
)
{
if
(
error
)
{
dprintk
(
"fh_verify: %
s/%s
permission failure, "
dprintk
(
"fh_verify: %
pd2
permission failure, "
"acc=%x, error=%d
\n
"
,
"acc=%x, error=%d
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
,
dentry
->
d_name
.
name
,
access
,
ntohl
(
error
));
access
,
ntohl
(
error
));
}
}
out:
out:
...
@@ -514,14 +513,13 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry,
...
@@ -514,14 +513,13 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry,
*/
*/
struct
inode
*
inode
=
dentry
->
d_inode
;
struct
inode
*
inode
=
dentry
->
d_inode
;
struct
dentry
*
parent
=
dentry
->
d_parent
;
__u32
*
datap
;
__u32
*
datap
;
dev_t
ex_dev
=
exp_sb
(
exp
)
->
s_dev
;
dev_t
ex_dev
=
exp_sb
(
exp
)
->
s_dev
;
dprintk
(
"nfsd: fh_compose(exp %02x:%02x/%ld %
s/%s
, ino=%ld)
\n
"
,
dprintk
(
"nfsd: fh_compose(exp %02x:%02x/%ld %
pd2
, ino=%ld)
\n
"
,
MAJOR
(
ex_dev
),
MINOR
(
ex_dev
),
MAJOR
(
ex_dev
),
MINOR
(
ex_dev
),
(
long
)
exp
->
ex_path
.
dentry
->
d_inode
->
i_ino
,
(
long
)
exp
->
ex_path
.
dentry
->
d_inode
->
i_ino
,
parent
->
d_name
.
name
,
dentry
->
d_name
.
name
,
dentry
,
(
inode
?
inode
->
i_ino
:
0
));
(
inode
?
inode
->
i_ino
:
0
));
/* Choose filehandle version and fsid type based on
/* Choose filehandle version and fsid type based on
...
@@ -534,13 +532,13 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry,
...
@@ -534,13 +532,13 @@ fh_compose(struct svc_fh *fhp, struct svc_export *exp, struct dentry *dentry,
fh_put
(
ref_fh
);
fh_put
(
ref_fh
);
if
(
fhp
->
fh_locked
||
fhp
->
fh_dentry
)
{
if
(
fhp
->
fh_locked
||
fhp
->
fh_dentry
)
{
printk
(
KERN_ERR
"fh_compose: fh %
s/%s
not initialized!
\n
"
,
printk
(
KERN_ERR
"fh_compose: fh %
pd2
not initialized!
\n
"
,
parent
->
d_name
.
name
,
dentry
->
d_name
.
name
);
dentry
);
}
}
if
(
fhp
->
fh_maxsize
<
NFS_FHSIZE
)
if
(
fhp
->
fh_maxsize
<
NFS_FHSIZE
)
printk
(
KERN_ERR
"fh_compose: called with maxsize %d! %
s/%s
\n
"
,
printk
(
KERN_ERR
"fh_compose: called with maxsize %d! %
pd2
\n
"
,
fhp
->
fh_maxsize
,
fhp
->
fh_maxsize
,
parent
->
d_name
.
name
,
dentry
->
d_name
.
name
);
dentry
);
fhp
->
fh_dentry
=
dget
(
dentry
);
/* our internal copy */
fhp
->
fh_dentry
=
dget
(
dentry
);
/* our internal copy */
fhp
->
fh_export
=
exp
;
fhp
->
fh_export
=
exp
;
...
@@ -613,8 +611,8 @@ fh_update(struct svc_fh *fhp)
...
@@ -613,8 +611,8 @@ fh_update(struct svc_fh *fhp)
printk
(
KERN_ERR
"fh_update: fh not verified!
\n
"
);
printk
(
KERN_ERR
"fh_update: fh not verified!
\n
"
);
goto
out
;
goto
out
;
out_negative:
out_negative:
printk
(
KERN_ERR
"fh_update: %
s/%s
still negative!
\n
"
,
printk
(
KERN_ERR
"fh_update: %
pd2
still negative!
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
);
dentry
);
goto
out
;
goto
out
;
}
}
...
...
fs/nfsd/nfsfh.h
浏览文件 @
a6a9f18f
...
@@ -173,8 +173,8 @@ fh_lock_nested(struct svc_fh *fhp, unsigned int subclass)
...
@@ -173,8 +173,8 @@ fh_lock_nested(struct svc_fh *fhp, unsigned int subclass)
BUG_ON
(
!
dentry
);
BUG_ON
(
!
dentry
);
if
(
fhp
->
fh_locked
)
{
if
(
fhp
->
fh_locked
)
{
printk
(
KERN_WARNING
"fh_lock: %
s/%s
already locked!
\n
"
,
printk
(
KERN_WARNING
"fh_lock: %
pd2
already locked!
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
->
d_name
.
name
);
dentry
);
return
;
return
;
}
}
...
...
fs/nfsd/vfs.c
浏览文件 @
a6a9f18f
...
@@ -1317,9 +1317,8 @@ nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
...
@@ -1317,9 +1317,8 @@ nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
if
(
!
fhp
->
fh_locked
)
{
if
(
!
fhp
->
fh_locked
)
{
/* not actually possible */
/* not actually possible */
printk
(
KERN_ERR
printk
(
KERN_ERR
"nfsd_create: parent %s/%s not locked!
\n
"
,
"nfsd_create: parent %pd2 not locked!
\n
"
,
dentry
->
d_parent
->
d_name
.
name
,
dentry
);
dentry
->
d_name
.
name
);
err
=
nfserr_io
;
err
=
nfserr_io
;
goto
out
;
goto
out
;
}
}
...
@@ -1329,8 +1328,8 @@ nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
...
@@ -1329,8 +1328,8 @@ nfsd_create(struct svc_rqst *rqstp, struct svc_fh *fhp,
*/
*/
err
=
nfserr_exist
;
err
=
nfserr_exist
;
if
(
dchild
->
d_inode
)
{
if
(
dchild
->
d_inode
)
{
dprintk
(
"nfsd_create: dentry %
s/%s
not negative!
\n
"
,
dprintk
(
"nfsd_create: dentry %
pd/%pd
not negative!
\n
"
,
dentry
->
d_name
.
name
,
dchild
->
d_name
.
name
);
dentry
,
dchild
);
goto
out
;
goto
out
;
}
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录