Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Linux-御风守护者
linux
提交
fc7e1310
L
linux
项目概览
Linux-御风守护者
/
linux
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
L
linux
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
fc7e1310
编写于
12月 20, 2005
作者:
L
Linus Torvalds
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'fixes' of
git://git.linux-nfs.org/pub/linux/nfs-2.6
上级
33c37c06
9b5b1f5b
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
46 addition
and
46 deletion
+46
-46
fs/lockd/clntlock.c
fs/lockd/clntlock.c
+4
-0
fs/nfs/direct.c
fs/nfs/direct.c
+6
-18
fs/nfs/file.c
fs/nfs/file.c
+4
-19
fs/nfs/inode.c
fs/nfs/inode.c
+23
-5
include/linux/nfs_fs.h
include/linux/nfs_fs.h
+1
-0
net/sunrpc/auth_gss/auth_gss.c
net/sunrpc/auth_gss/auth_gss.c
+4
-2
net/sunrpc/rpc_pipe.c
net/sunrpc/rpc_pipe.c
+2
-2
net/sunrpc/xprtsock.c
net/sunrpc/xprtsock.c
+2
-0
未找到文件。
fs/lockd/clntlock.c
浏览文件 @
fc7e1310
...
...
@@ -157,6 +157,8 @@ void nlmclnt_mark_reclaim(struct nlm_host *host)
inode
=
fl
->
fl_file
->
f_dentry
->
d_inode
;
if
(
inode
->
i_sb
->
s_magic
!=
NFS_SUPER_MAGIC
)
continue
;
if
(
fl
->
fl_u
.
nfs_fl
.
owner
==
NULL
)
continue
;
if
(
fl
->
fl_u
.
nfs_fl
.
owner
->
host
!=
host
)
continue
;
if
(
!
(
fl
->
fl_u
.
nfs_fl
.
flags
&
NFS_LCK_GRANTED
))
...
...
@@ -226,6 +228,8 @@ reclaimer(void *ptr)
inode
=
fl
->
fl_file
->
f_dentry
->
d_inode
;
if
(
inode
->
i_sb
->
s_magic
!=
NFS_SUPER_MAGIC
)
continue
;
if
(
fl
->
fl_u
.
nfs_fl
.
owner
==
NULL
)
continue
;
if
(
fl
->
fl_u
.
nfs_fl
.
owner
->
host
!=
host
)
continue
;
if
(
!
(
fl
->
fl_u
.
nfs_fl
.
flags
&
NFS_LCK_RECLAIM
))
...
...
fs/nfs/direct.c
浏览文件 @
fc7e1310
...
...
@@ -678,15 +678,9 @@ nfs_file_direct_read(struct kiocb *iocb, char __user *buf, size_t count, loff_t
if
(
!
count
)
goto
out
;
if
(
mapping
->
nrpages
)
{
retval
=
filemap_fdatawrite
(
mapping
);
if
(
retval
==
0
)
retval
=
nfs_wb_all
(
inode
);
if
(
retval
==
0
)
retval
=
filemap_fdatawait
(
mapping
);
if
(
retval
)
goto
out
;
}
retval
=
nfs_sync_mapping
(
mapping
);
if
(
retval
)
goto
out
;
retval
=
nfs_direct_read
(
inode
,
ctx
,
&
iov
,
pos
,
1
);
if
(
retval
>
0
)
...
...
@@ -764,15 +758,9 @@ nfs_file_direct_write(struct kiocb *iocb, const char __user *buf, size_t count,
if
(
!
count
)
goto
out
;
if
(
mapping
->
nrpages
)
{
retval
=
filemap_fdatawrite
(
mapping
);
if
(
retval
==
0
)
retval
=
nfs_wb_all
(
inode
);
if
(
retval
==
0
)
retval
=
filemap_fdatawait
(
mapping
);
if
(
retval
)
goto
out
;
}
retval
=
nfs_sync_mapping
(
mapping
);
if
(
retval
)
goto
out
;
retval
=
nfs_direct_write
(
inode
,
ctx
,
&
iov
,
pos
,
1
);
if
(
mapping
->
nrpages
)
...
...
fs/nfs/file.c
浏览文件 @
fc7e1310
...
...
@@ -433,11 +433,7 @@ static int do_unlk(struct file *filp, int cmd, struct file_lock *fl)
* Flush all pending writes before doing anything
* with locks..
*/
filemap_fdatawrite
(
filp
->
f_mapping
);
down
(
&
inode
->
i_sem
);
nfs_wb_all
(
inode
);
up
(
&
inode
->
i_sem
);
filemap_fdatawait
(
filp
->
f_mapping
);
nfs_sync_mapping
(
filp
->
f_mapping
);
/* NOTE: special case
* If we're signalled while cleaning up locks on process exit, we
...
...
@@ -465,15 +461,8 @@ static int do_setlk(struct file *filp, int cmd, struct file_lock *fl)
* Flush all pending writes before doing anything
* with locks..
*/
status
=
filemap_fdatawrite
(
filp
->
f_mapping
);
if
(
status
==
0
)
{
down
(
&
inode
->
i_sem
);
status
=
nfs_wb_all
(
inode
);
up
(
&
inode
->
i_sem
);
if
(
status
==
0
)
status
=
filemap_fdatawait
(
filp
->
f_mapping
);
}
if
(
status
<
0
)
status
=
nfs_sync_mapping
(
filp
->
f_mapping
);
if
(
status
!=
0
)
goto
out
;
lock_kernel
();
...
...
@@ -497,11 +486,7 @@ static int do_setlk(struct file *filp, int cmd, struct file_lock *fl)
* Make sure we clear the cache whenever we try to get the lock.
* This makes locking act as a cache coherency point.
*/
filemap_fdatawrite
(
filp
->
f_mapping
);
down
(
&
inode
->
i_sem
);
nfs_wb_all
(
inode
);
/* we may have slept */
up
(
&
inode
->
i_sem
);
filemap_fdatawait
(
filp
->
f_mapping
);
nfs_sync_mapping
(
filp
->
f_mapping
);
nfs_zap_caches
(
inode
);
out:
rpc_clnt_sigunmask
(
NFS_CLIENT
(
inode
),
&
oldset
);
...
...
fs/nfs/inode.c
浏览文件 @
fc7e1310
...
...
@@ -640,6 +640,27 @@ static int nfs_show_options(struct seq_file *m, struct vfsmount *mnt)
return
0
;
}
/**
* nfs_sync_mapping - helper to flush all mmapped dirty data to disk
*/
int
nfs_sync_mapping
(
struct
address_space
*
mapping
)
{
int
ret
;
if
(
mapping
->
nrpages
==
0
)
return
0
;
unmap_mapping_range
(
mapping
,
0
,
0
,
0
);
ret
=
filemap_fdatawrite
(
mapping
);
if
(
ret
!=
0
)
goto
out
;
ret
=
filemap_fdatawait
(
mapping
);
if
(
ret
!=
0
)
goto
out
;
ret
=
nfs_wb_all
(
mapping
->
host
);
out:
return
ret
;
}
/*
* Invalidate the local caches
*/
...
...
@@ -1179,11 +1200,8 @@ void nfs_revalidate_mapping(struct inode *inode, struct address_space *mapping)
struct
nfs_inode
*
nfsi
=
NFS_I
(
inode
);
if
(
nfsi
->
cache_validity
&
NFS_INO_INVALID_DATA
)
{
if
(
S_ISREG
(
inode
->
i_mode
))
{
if
(
filemap_fdatawrite
(
mapping
)
==
0
)
filemap_fdatawait
(
mapping
);
nfs_wb_all
(
inode
);
}
if
(
S_ISREG
(
inode
->
i_mode
))
nfs_sync_mapping
(
mapping
);
invalidate_inode_pages2
(
mapping
);
spin_lock
(
&
inode
->
i_lock
);
...
...
include/linux/nfs_fs.h
浏览文件 @
fc7e1310
...
...
@@ -291,6 +291,7 @@ static inline int nfs_verify_change_attribute(struct inode *inode, unsigned long
/*
* linux/fs/nfs/inode.c
*/
extern
int
nfs_sync_mapping
(
struct
address_space
*
mapping
);
extern
void
nfs_zap_caches
(
struct
inode
*
);
extern
struct
inode
*
nfs_fhget
(
struct
super_block
*
,
struct
nfs_fh
*
,
struct
nfs_fattr
*
);
...
...
net/sunrpc/auth_gss/auth_gss.c
浏览文件 @
fc7e1310
...
...
@@ -638,7 +638,7 @@ gss_pipe_destroy_msg(struct rpc_pipe_msg *msg)
gss_msg
);
atomic_inc
(
&
gss_msg
->
count
);
gss_unhash_msg
(
gss_msg
);
if
(
msg
->
errno
==
-
ETIMEDOUT
||
msg
->
errno
==
-
EPIPE
)
{
if
(
msg
->
errno
==
-
ETIMEDOUT
)
{
unsigned
long
now
=
jiffies
;
if
(
time_after
(
now
,
ratelimit
))
{
printk
(
KERN_WARNING
"RPC: AUTH_GSS upcall timed out.
\n
"
...
...
@@ -786,7 +786,9 @@ gss_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int taskflags)
cred
->
gc_flags
=
0
;
cred
->
gc_base
.
cr_ops
=
&
gss_credops
;
cred
->
gc_service
=
gss_auth
->
service
;
err
=
gss_create_upcall
(
gss_auth
,
cred
);
do
{
err
=
gss_create_upcall
(
gss_auth
,
cred
);
}
while
(
err
==
-
EAGAIN
);
if
(
err
<
0
)
goto
out_err
;
...
...
net/sunrpc/rpc_pipe.c
浏览文件 @
fc7e1310
...
...
@@ -174,7 +174,7 @@ rpc_pipe_release(struct inode *inode, struct file *filp)
goto
out
;
msg
=
(
struct
rpc_pipe_msg
*
)
filp
->
private_data
;
if
(
msg
!=
NULL
)
{
msg
->
errno
=
-
E
PIPE
;
msg
->
errno
=
-
E
AGAIN
;
list_del_init
(
&
msg
->
list
);
rpci
->
ops
->
destroy_msg
(
msg
);
}
...
...
@@ -183,7 +183,7 @@ rpc_pipe_release(struct inode *inode, struct file *filp)
if
(
filp
->
f_mode
&
FMODE_READ
)
rpci
->
nreaders
--
;
if
(
!
rpci
->
nreaders
)
__rpc_purge_upcall
(
inode
,
-
E
PIPE
);
__rpc_purge_upcall
(
inode
,
-
E
AGAIN
);
if
(
rpci
->
ops
->
release_pipe
)
rpci
->
ops
->
release_pipe
(
inode
);
out:
...
...
net/sunrpc/xprtsock.c
浏览文件 @
fc7e1310
...
...
@@ -990,6 +990,7 @@ static void xs_udp_connect_worker(void *args)
sk
->
sk_data_ready
=
xs_udp_data_ready
;
sk
->
sk_write_space
=
xs_udp_write_space
;
sk
->
sk_no_check
=
UDP_CSUM_NORCV
;
sk
->
sk_allocation
=
GFP_ATOMIC
;
xprt_set_connected
(
xprt
);
...
...
@@ -1074,6 +1075,7 @@ static void xs_tcp_connect_worker(void *args)
sk
->
sk_data_ready
=
xs_tcp_data_ready
;
sk
->
sk_state_change
=
xs_tcp_state_change
;
sk
->
sk_write_space
=
xs_tcp_write_space
;
sk
->
sk_allocation
=
GFP_ATOMIC
;
/* socket options */
sk
->
sk_userlocks
|=
SOCK_BINDPORT_LOCK
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录