diff options
| -rw-r--r-- | fs/nfsd/vfs.c | 5 | ||||
| -rw-r--r-- | net/sunrpc/svc_xprt.c | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/fs/nfsd/vfs.c b/fs/nfsd/vfs.c index 7c2e337d05af..c194793b642b 100644 --- a/fs/nfsd/vfs.c +++ b/fs/nfsd/vfs.c | |||
| @@ -780,12 +780,9 @@ static inline int nfsd_dosync(struct file *filp, struct dentry *dp, | |||
| 780 | int (*fsync) (struct file *, struct dentry *, int); | 780 | int (*fsync) (struct file *, struct dentry *, int); |
| 781 | int err; | 781 | int err; |
| 782 | 782 | ||
| 783 | err = filemap_fdatawrite(inode->i_mapping); | 783 | err = filemap_write_and_wait(inode->i_mapping); |
| 784 | if (err == 0 && fop && (fsync = fop->fsync)) | 784 | if (err == 0 && fop && (fsync = fop->fsync)) |
| 785 | err = fsync(filp, dp, 0); | 785 | err = fsync(filp, dp, 0); |
| 786 | if (err == 0) | ||
| 787 | err = filemap_fdatawait(inode->i_mapping); | ||
| 788 | |||
| 789 | return err; | 786 | return err; |
| 790 | } | 787 | } |
| 791 | 788 | ||
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index 1c924ee0a1ef..7d1f9e928f69 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c | |||
| @@ -699,7 +699,8 @@ int svc_recv(struct svc_rqst *rqstp, long timeout) | |||
| 699 | spin_unlock_bh(&pool->sp_lock); | 699 | spin_unlock_bh(&pool->sp_lock); |
| 700 | 700 | ||
| 701 | len = 0; | 701 | len = 0; |
| 702 | if (test_bit(XPT_LISTENER, &xprt->xpt_flags)) { | 702 | if (test_bit(XPT_LISTENER, &xprt->xpt_flags) && |
| 703 | !test_bit(XPT_CLOSE, &xprt->xpt_flags)) { | ||
| 703 | struct svc_xprt *newxpt; | 704 | struct svc_xprt *newxpt; |
| 704 | newxpt = xprt->xpt_ops->xpo_accept(xprt); | 705 | newxpt = xprt->xpt_ops->xpo_accept(xprt); |
| 705 | if (newxpt) { | 706 | if (newxpt) { |
