Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
88be9f99
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看板
提交
88be9f99
编写于
6月 05, 2007
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NFS: Replace vfsmount and dentry in nfs_open_context with struct path
Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
de05a0cc
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
29 addition
and
29 deletion
+29
-29
fs/nfs/delegation.c
fs/nfs/delegation.c
+1
-1
fs/nfs/direct.c
fs/nfs/direct.c
+2
-2
fs/nfs/inode.c
fs/nfs/inode.c
+5
-5
fs/nfs/nfs4proc.c
fs/nfs/nfs4proc.c
+3
-3
fs/nfs/pagelist.c
fs/nfs/pagelist.c
+3
-3
fs/nfs/read.c
fs/nfs/read.c
+3
-3
fs/nfs/write.c
fs/nfs/write.c
+10
-10
include/linux/nfs_fs.h
include/linux/nfs_fs.h
+2
-2
未找到文件。
fs/nfs/delegation.c
浏览文件 @
88be9f99
...
...
@@ -74,7 +74,7 @@ static void nfs_delegation_claim_opens(struct inode *inode)
continue
;
get_nfs_open_context
(
ctx
);
spin_unlock
(
&
inode
->
i_lock
);
err
=
nfs4_open_delegation_recall
(
ctx
->
dentry
,
state
);
err
=
nfs4_open_delegation_recall
(
ctx
->
path
.
dentry
,
state
);
if
(
err
>=
0
)
err
=
nfs_delegation_claim_locks
(
ctx
,
state
);
put_nfs_open_context
(
ctx
);
...
...
fs/nfs/direct.c
浏览文件 @
88be9f99
...
...
@@ -266,7 +266,7 @@ static const struct rpc_call_ops nfs_read_direct_ops = {
static
ssize_t
nfs_direct_read_schedule
(
struct
nfs_direct_req
*
dreq
,
unsigned
long
user_addr
,
size_t
count
,
loff_t
pos
)
{
struct
nfs_open_context
*
ctx
=
dreq
->
ctx
;
struct
inode
*
inode
=
ctx
->
dentry
->
d_inode
;
struct
inode
*
inode
=
ctx
->
path
.
dentry
->
d_inode
;
size_t
rsize
=
NFS_SERVER
(
inode
)
->
rsize
;
unsigned
int
pgbase
;
int
result
;
...
...
@@ -606,7 +606,7 @@ static const struct rpc_call_ops nfs_write_direct_ops = {
static
ssize_t
nfs_direct_write_schedule
(
struct
nfs_direct_req
*
dreq
,
unsigned
long
user_addr
,
size_t
count
,
loff_t
pos
,
int
sync
)
{
struct
nfs_open_context
*
ctx
=
dreq
->
ctx
;
struct
inode
*
inode
=
ctx
->
dentry
->
d_inode
;
struct
inode
*
inode
=
ctx
->
path
.
dentry
->
d_inode
;
size_t
wsize
=
NFS_SERVER
(
inode
)
->
wsize
;
unsigned
int
pgbase
;
int
result
;
...
...
fs/nfs/inode.c
浏览文件 @
88be9f99
...
...
@@ -462,8 +462,8 @@ static struct nfs_open_context *alloc_nfs_open_context(struct vfsmount *mnt, str
ctx
=
kmalloc
(
sizeof
(
*
ctx
),
GFP_KERNEL
);
if
(
ctx
!=
NULL
)
{
atomic_set
(
&
ctx
->
count
,
1
);
ctx
->
dentry
=
dget
(
dentry
);
ctx
->
vfs
mnt
=
mntget
(
mnt
);
ctx
->
path
.
dentry
=
dget
(
dentry
);
ctx
->
path
.
mnt
=
mntget
(
mnt
);
ctx
->
cred
=
get_rpccred
(
cred
);
ctx
->
state
=
NULL
;
ctx
->
lockowner
=
current
->
files
;
...
...
@@ -484,7 +484,7 @@ void put_nfs_open_context(struct nfs_open_context *ctx)
{
if
(
atomic_dec_and_test
(
&
ctx
->
count
))
{
if
(
!
list_empty
(
&
ctx
->
list
))
{
struct
inode
*
inode
=
ctx
->
dentry
->
d_inode
;
struct
inode
*
inode
=
ctx
->
path
.
dentry
->
d_inode
;
spin_lock
(
&
inode
->
i_lock
);
list_del
(
&
ctx
->
list
);
spin_unlock
(
&
inode
->
i_lock
);
...
...
@@ -493,8 +493,8 @@ void put_nfs_open_context(struct nfs_open_context *ctx)
nfs4_close_state
(
ctx
->
state
,
ctx
->
mode
);
if
(
ctx
->
cred
!=
NULL
)
put_rpccred
(
ctx
->
cred
);
dput
(
ctx
->
dentry
);
mntput
(
ctx
->
vfs
mnt
);
dput
(
ctx
->
path
.
dentry
);
mntput
(
ctx
->
path
.
mnt
);
kfree
(
ctx
);
}
}
...
...
fs/nfs/nfs4proc.c
浏览文件 @
88be9f99
...
...
@@ -512,7 +512,7 @@ static int nfs4_open_reclaim(struct nfs4_state_owner *sp, struct nfs4_state *sta
ctx
=
nfs4_state_find_open_context
(
state
);
if
(
IS_ERR
(
ctx
))
return
PTR_ERR
(
ctx
);
ret
=
nfs4_do_open_reclaim
(
sp
,
state
,
ctx
->
dentry
);
ret
=
nfs4_do_open_reclaim
(
sp
,
state
,
ctx
->
path
.
dentry
);
put_nfs_open_context
(
ctx
);
return
ret
;
}
...
...
@@ -862,7 +862,7 @@ static int nfs4_open_expired(struct nfs4_state_owner *sp, struct nfs4_state *sta
ctx
=
nfs4_state_find_open_context
(
state
);
if
(
IS_ERR
(
ctx
))
return
PTR_ERR
(
ctx
);
ret
=
nfs4_do_open_expired
(
sp
,
state
,
ctx
->
dentry
);
ret
=
nfs4_do_open_expired
(
sp
,
state
,
ctx
->
path
.
dentry
);
put_nfs_open_context
(
ctx
);
return
ret
;
}
...
...
@@ -3285,7 +3285,7 @@ static void nfs4_lock_done(struct rpc_task *task, void *calldata)
memcpy
(
data
->
lsp
->
ls_stateid
.
data
,
data
->
res
.
stateid
.
data
,
sizeof
(
data
->
lsp
->
ls_stateid
.
data
));
data
->
lsp
->
ls_flags
|=
NFS_LOCK_INITIALIZED
;
renew_lease
(
NFS_SERVER
(
data
->
ctx
->
dentry
->
d_inode
),
data
->
timestamp
);
renew_lease
(
NFS_SERVER
(
data
->
ctx
->
path
.
dentry
->
d_inode
),
data
->
timestamp
);
}
nfs_increment_lock_seqid
(
data
->
rpc_status
,
data
->
arg
.
lock_seqid
);
out:
...
...
fs/nfs/pagelist.c
浏览文件 @
88be9f99
...
...
@@ -114,7 +114,7 @@ void nfs_unlock_request(struct nfs_page *req)
*/
int
nfs_set_page_writeback_locked
(
struct
nfs_page
*
req
)
{
struct
nfs_inode
*
nfsi
=
NFS_I
(
req
->
wb_context
->
dentry
->
d_inode
);
struct
nfs_inode
*
nfsi
=
NFS_I
(
req
->
wb_context
->
path
.
dentry
->
d_inode
);
if
(
!
nfs_lock_request
(
req
))
return
0
;
...
...
@@ -127,7 +127,7 @@ int nfs_set_page_writeback_locked(struct nfs_page *req)
*/
void
nfs_clear_page_writeback
(
struct
nfs_page
*
req
)
{
struct
nfs_inode
*
nfsi
=
NFS_I
(
req
->
wb_context
->
dentry
->
d_inode
);
struct
nfs_inode
*
nfsi
=
NFS_I
(
req
->
wb_context
->
path
.
dentry
->
d_inode
);
if
(
req
->
wb_page
!=
NULL
)
{
spin_lock
(
&
nfsi
->
req_lock
);
...
...
@@ -193,7 +193,7 @@ static int nfs_wait_bit_interruptible(void *word)
int
nfs_wait_on_request
(
struct
nfs_page
*
req
)
{
struct
rpc_clnt
*
clnt
=
NFS_CLIENT
(
req
->
wb_context
->
dentry
->
d_inode
);
struct
rpc_clnt
*
clnt
=
NFS_CLIENT
(
req
->
wb_context
->
path
.
dentry
->
d_inode
);
sigset_t
oldmask
;
int
ret
=
0
;
...
...
fs/nfs/read.c
浏览文件 @
88be9f99
...
...
@@ -145,8 +145,8 @@ static void nfs_readpage_release(struct nfs_page *req)
unlock_page
(
req
->
wb_page
);
dprintk
(
"NFS: read done (%s/%Ld %d@%Ld)
\n
"
,
req
->
wb_context
->
dentry
->
d_inode
->
i_sb
->
s_id
,
(
long
long
)
NFS_FILEID
(
req
->
wb_context
->
dentry
->
d_inode
),
req
->
wb_context
->
path
.
dentry
->
d_inode
->
i_sb
->
s_id
,
(
long
long
)
NFS_FILEID
(
req
->
wb_context
->
path
.
dentry
->
d_inode
),
req
->
wb_bytes
,
(
long
long
)
req_offset
(
req
));
nfs_clear_request
(
req
);
...
...
@@ -164,7 +164,7 @@ static void nfs_read_rpcsetup(struct nfs_page *req, struct nfs_read_data *data,
int
flags
;
data
->
req
=
req
;
data
->
inode
=
inode
=
req
->
wb_context
->
dentry
->
d_inode
;
data
->
inode
=
inode
=
req
->
wb_context
->
path
.
dentry
->
d_inode
;
data
->
cred
=
req
->
wb_context
->
cred
;
data
->
args
.
fh
=
NFS_FH
(
inode
);
...
...
fs/nfs/write.c
浏览文件 @
88be9f99
...
...
@@ -407,7 +407,7 @@ static int nfs_inode_add_request(struct inode *inode, struct nfs_page *req)
*/
static
void
nfs_inode_remove_request
(
struct
nfs_page
*
req
)
{
struct
inode
*
inode
=
req
->
wb_context
->
dentry
->
d_inode
;
struct
inode
*
inode
=
req
->
wb_context
->
path
.
dentry
->
d_inode
;
struct
nfs_inode
*
nfsi
=
NFS_I
(
inode
);
BUG_ON
(
!
NFS_WBACK_BUSY
(
req
));
...
...
@@ -455,7 +455,7 @@ nfs_dirty_request(struct nfs_page *req)
static
void
nfs_mark_request_commit
(
struct
nfs_page
*
req
)
{
struct
inode
*
inode
=
req
->
wb_context
->
dentry
->
d_inode
;
struct
inode
*
inode
=
req
->
wb_context
->
path
.
dentry
->
d_inode
;
struct
nfs_inode
*
nfsi
=
NFS_I
(
inode
);
spin_lock
(
&
nfsi
->
req_lock
);
...
...
@@ -789,7 +789,7 @@ static void nfs_write_rpcsetup(struct nfs_page *req,
* NB: take care not to mess about with data->commit et al. */
data
->
req
=
req
;
data
->
inode
=
inode
=
req
->
wb_context
->
dentry
->
d_inode
;
data
->
inode
=
inode
=
req
->
wb_context
->
path
.
dentry
->
d_inode
;
data
->
cred
=
req
->
wb_context
->
cred
;
data
->
args
.
fh
=
NFS_FH
(
inode
);
...
...
@@ -957,8 +957,8 @@ static void nfs_writeback_done_partial(struct rpc_task *task, void *calldata)
struct
page
*
page
=
req
->
wb_page
;
dprintk
(
"NFS: write (%s/%Ld %d@%Ld)"
,
req
->
wb_context
->
dentry
->
d_inode
->
i_sb
->
s_id
,
(
long
long
)
NFS_FILEID
(
req
->
wb_context
->
dentry
->
d_inode
),
req
->
wb_context
->
path
.
dentry
->
d_inode
->
i_sb
->
s_id
,
(
long
long
)
NFS_FILEID
(
req
->
wb_context
->
path
.
dentry
->
d_inode
),
req
->
wb_bytes
,
(
long
long
)
req_offset
(
req
));
...
...
@@ -1023,8 +1023,8 @@ static void nfs_writeback_done_full(struct rpc_task *task, void *calldata)
page
=
req
->
wb_page
;
dprintk
(
"NFS: write (%s/%Ld %d@%Ld)"
,
req
->
wb_context
->
dentry
->
d_inode
->
i_sb
->
s_id
,
(
long
long
)
NFS_FILEID
(
req
->
wb_context
->
dentry
->
d_inode
),
req
->
wb_context
->
path
.
dentry
->
d_inode
->
i_sb
->
s_id
,
(
long
long
)
NFS_FILEID
(
req
->
wb_context
->
path
.
dentry
->
d_inode
),
req
->
wb_bytes
,
(
long
long
)
req_offset
(
req
));
...
...
@@ -1162,7 +1162,7 @@ static void nfs_commit_rpcsetup(struct list_head *head,
list_splice_init
(
head
,
&
data
->
pages
);
first
=
nfs_list_entry
(
data
->
pages
.
next
);
inode
=
first
->
wb_context
->
dentry
->
d_inode
;
inode
=
first
->
wb_context
->
path
.
dentry
->
d_inode
;
data
->
inode
=
inode
;
data
->
cred
=
first
->
wb_context
->
cred
;
...
...
@@ -1239,8 +1239,8 @@ static void nfs_commit_done(struct rpc_task *task, void *calldata)
dec_zone_page_state
(
req
->
wb_page
,
NR_UNSTABLE_NFS
);
dprintk
(
"NFS: commit (%s/%Ld %d@%Ld)"
,
req
->
wb_context
->
dentry
->
d_inode
->
i_sb
->
s_id
,
(
long
long
)
NFS_FILEID
(
req
->
wb_context
->
dentry
->
d_inode
),
req
->
wb_context
->
path
.
dentry
->
d_inode
->
i_sb
->
s_id
,
(
long
long
)
NFS_FILEID
(
req
->
wb_context
->
path
.
dentry
->
d_inode
),
req
->
wb_bytes
,
(
long
long
)
req_offset
(
req
));
if
(
task
->
tk_status
<
0
)
{
...
...
include/linux/nfs_fs.h
浏览文件 @
88be9f99
...
...
@@ -31,6 +31,7 @@
#include <linux/in.h>
#include <linux/mm.h>
#include <linux/namei.h>
#include <linux/pagemap.h>
#include <linux/rbtree.h>
#include <linux/rwsem.h>
...
...
@@ -70,8 +71,7 @@ struct nfs_access_entry {
struct
nfs4_state
;
struct
nfs_open_context
{
atomic_t
count
;
struct
vfsmount
*
vfsmnt
;
struct
dentry
*
dentry
;
struct
path
path
;
struct
rpc_cred
*
cred
;
struct
nfs4_state
*
state
;
fl_owner_t
lockowner
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录