diff options
| author | Jan Engelmohr <jan.engelmohr@mailbox.tu-dresden.de> | 2016-07-26 16:26:12 +0200 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2016-08-26 15:52:33 +0200 |
| commit | 01a28e78b62e161ed72d0830aa89ecb2be680074 (patch) | |
| tree | 2fb6c6d1b795dfad0a7e7c482cd08c44ec82bf53 /fs/nfs | |
| parent | 516480c70a5392533c2e3a81863ac02206a66e1b (diff) | |
3.10.67 -> 3.10.68
Diffstat (limited to 'fs/nfs')
| -rw-r--r-- | fs/nfs/direct.c | 6 | ||||
| -rw-r--r-- | fs/nfs/nfs4client.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/fs/nfs/direct.c b/fs/nfs/direct.c index 725e87538..615c5079d 100644 --- a/fs/nfs/direct.c +++ b/fs/nfs/direct.c @@ -123,6 +123,12 @@ static inline int put_dreq(struct nfs_direct_req *dreq) */ ssize_t nfs_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, loff_t pos, unsigned long nr_segs) { + struct inode *inode = iocb->ki_filp->f_mapping->host; + + /* we only support swap file calling nfs_direct_IO */ + if (!IS_SWAPFILE(inode)) + return 0; + #ifndef CONFIG_NFS_SWAP dprintk("NFS: nfs_direct_IO (%s) off/no(%Ld/%lu) EINVAL\n", iocb->ki_filp->f_path.dentry->d_name.name, diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c index 519833d04..5f8d5ffda 100644 --- a/fs/nfs/nfs4client.c +++ b/fs/nfs/nfs4client.c @@ -462,7 +462,7 @@ int nfs41_walk_client_list(struct nfs_client *new, prev = pos; status = nfs_wait_client_init_complete(pos); - if (status == 0) { + if (pos->cl_cons_state == NFS_CS_SESSION_INITING) { nfs4_schedule_lease_recovery(pos); status = nfs4_wait_clnt_recover(pos); } |
