diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/lockd/clntlock.c | 2 | ||||
-rw-r--r-- | fs/lockd/host.c | 2 | ||||
-rw-r--r-- | fs/lockd/xdr.c | 4 | ||||
-rw-r--r-- | fs/lockd/xdr4.c | 6 | ||||
-rw-r--r-- | fs/nfs/callback.h | 4 | ||||
-rw-r--r-- | fs/nfs/delegation.c | 2 | ||||
-rw-r--r-- | fs/nfs/dir.c | 4 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 4 | ||||
-rw-r--r-- | fs/nfs/nfs4state.c | 2 | ||||
-rw-r--r-- | fs/nfs/nfs4xdr.c | 96 | ||||
-rw-r--r-- | fs/nfs/read.c | 10 | ||||
-rw-r--r-- | fs/nfs/write.c | 6 |
12 files changed, 70 insertions, 72 deletions
diff --git a/fs/lockd/clntlock.c b/fs/lockd/clntlock.c index f4d45d4d835b..d070b18e539d 100644 --- a/fs/lockd/clntlock.c +++ b/fs/lockd/clntlock.c | |||
@@ -153,7 +153,7 @@ nlmclnt_recovery(struct nlm_host *host) | |||
153 | if (!host->h_reclaiming++) { | 153 | if (!host->h_reclaiming++) { |
154 | nlm_get_host(host); | 154 | nlm_get_host(host); |
155 | __module_get(THIS_MODULE); | 155 | __module_get(THIS_MODULE); |
156 | if (kernel_thread(reclaimer, host, CLONE_KERNEL) < 0) | 156 | if (kernel_thread(reclaimer, host, CLONE_FS | CLONE_FILES) < 0) |
157 | module_put(THIS_MODULE); | 157 | module_put(THIS_MODULE); |
158 | } | 158 | } |
159 | } | 159 | } |
diff --git a/fs/lockd/host.c b/fs/lockd/host.c index ad21c0713efa..96070bff93fc 100644 --- a/fs/lockd/host.c +++ b/fs/lockd/host.c | |||
@@ -221,7 +221,7 @@ nlm_bind_host(struct nlm_host *host) | |||
221 | host->h_nextrebind - jiffies); | 221 | host->h_nextrebind - jiffies); |
222 | } | 222 | } |
223 | } else { | 223 | } else { |
224 | unsigned long increment = nlmsvc_timeout * HZ; | 224 | unsigned long increment = nlmsvc_timeout; |
225 | struct rpc_timeout timeparms = { | 225 | struct rpc_timeout timeparms = { |
226 | .to_initval = increment, | 226 | .to_initval = increment, |
227 | .to_increment = increment, | 227 | .to_increment = increment, |
diff --git a/fs/lockd/xdr.c b/fs/lockd/xdr.c index 9702956d206c..5316e307a49d 100644 --- a/fs/lockd/xdr.c +++ b/fs/lockd/xdr.c | |||
@@ -586,10 +586,6 @@ static struct rpc_version nlm_version3 = { | |||
586 | .procs = nlm_procedures, | 586 | .procs = nlm_procedures, |
587 | }; | 587 | }; |
588 | 588 | ||
589 | #ifdef CONFIG_LOCKD_V4 | ||
590 | extern struct rpc_version nlm_version4; | ||
591 | #endif | ||
592 | |||
593 | static struct rpc_version * nlm_versions[] = { | 589 | static struct rpc_version * nlm_versions[] = { |
594 | [1] = &nlm_version1, | 590 | [1] = &nlm_version1, |
595 | [3] = &nlm_version3, | 591 | [3] = &nlm_version3, |
diff --git a/fs/lockd/xdr4.c b/fs/lockd/xdr4.c index ce1efdbe1b3a..846fc1d639dd 100644 --- a/fs/lockd/xdr4.c +++ b/fs/lockd/xdr4.c | |||
@@ -123,7 +123,8 @@ static __be32 * | |||
123 | nlm4_decode_lock(__be32 *p, struct nlm_lock *lock) | 123 | nlm4_decode_lock(__be32 *p, struct nlm_lock *lock) |
124 | { | 124 | { |
125 | struct file_lock *fl = &lock->fl; | 125 | struct file_lock *fl = &lock->fl; |
126 | __s64 len, start, end; | 126 | __u64 len, start; |
127 | __s64 end; | ||
127 | 128 | ||
128 | if (!(p = xdr_decode_string_inplace(p, &lock->caller, | 129 | if (!(p = xdr_decode_string_inplace(p, &lock->caller, |
129 | &lock->len, NLM_MAXSTRLEN)) | 130 | &lock->len, NLM_MAXSTRLEN)) |
@@ -417,7 +418,8 @@ nlm4clt_decode_testres(struct rpc_rqst *req, __be32 *p, struct nlm_res *resp) | |||
417 | if (resp->status == nlm_lck_denied) { | 418 | if (resp->status == nlm_lck_denied) { |
418 | struct file_lock *fl = &resp->lock.fl; | 419 | struct file_lock *fl = &resp->lock.fl; |
419 | u32 excl; | 420 | u32 excl; |
420 | s64 start, end, len; | 421 | __u64 start, len; |
422 | __s64 end; | ||
421 | 423 | ||
422 | memset(&resp->lock, 0, sizeof(resp->lock)); | 424 | memset(&resp->lock, 0, sizeof(resp->lock)); |
423 | locks_init_lock(fl); | 425 | locks_init_lock(fl); |
diff --git a/fs/nfs/callback.h b/fs/nfs/callback.h index db3d7919c601..c2bb14e053e1 100644 --- a/fs/nfs/callback.h +++ b/fs/nfs/callback.h | |||
@@ -24,7 +24,7 @@ enum nfs4_callback_opnum { | |||
24 | }; | 24 | }; |
25 | 25 | ||
26 | struct cb_compound_hdr_arg { | 26 | struct cb_compound_hdr_arg { |
27 | int taglen; | 27 | unsigned int taglen; |
28 | const char *tag; | 28 | const char *tag; |
29 | unsigned int callback_ident; | 29 | unsigned int callback_ident; |
30 | unsigned nops; | 30 | unsigned nops; |
@@ -32,7 +32,7 @@ struct cb_compound_hdr_arg { | |||
32 | 32 | ||
33 | struct cb_compound_hdr_res { | 33 | struct cb_compound_hdr_res { |
34 | __be32 *status; | 34 | __be32 *status; |
35 | int taglen; | 35 | unsigned int taglen; |
36 | const char *tag; | 36 | const char *tag; |
37 | __be32 *nops; | 37 | __be32 *nops; |
38 | }; | 38 | }; |
diff --git a/fs/nfs/delegation.c b/fs/nfs/delegation.c index 841c99a9b11c..7f37d1bea83f 100644 --- a/fs/nfs/delegation.c +++ b/fs/nfs/delegation.c | |||
@@ -226,7 +226,7 @@ restart: | |||
226 | spin_unlock(&clp->cl_lock); | 226 | spin_unlock(&clp->cl_lock); |
227 | } | 227 | } |
228 | 228 | ||
229 | int nfs_do_expire_all_delegations(void *ptr) | 229 | static int nfs_do_expire_all_delegations(void *ptr) |
230 | { | 230 | { |
231 | struct nfs_client *clp = ptr; | 231 | struct nfs_client *clp = ptr; |
232 | struct nfs_delegation *delegation; | 232 | struct nfs_delegation *delegation; |
diff --git a/fs/nfs/dir.c b/fs/nfs/dir.c index 3df428816559..ac92e45432a3 100644 --- a/fs/nfs/dir.c +++ b/fs/nfs/dir.c | |||
@@ -607,7 +607,7 @@ static int nfs_readdir(struct file *filp, void *dirent, filldir_t filldir) | |||
607 | return res; | 607 | return res; |
608 | } | 608 | } |
609 | 609 | ||
610 | loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int origin) | 610 | static loff_t nfs_llseek_dir(struct file *filp, loff_t offset, int origin) |
611 | { | 611 | { |
612 | mutex_lock(&filp->f_path.dentry->d_inode->i_mutex); | 612 | mutex_lock(&filp->f_path.dentry->d_inode->i_mutex); |
613 | switch (origin) { | 613 | switch (origin) { |
@@ -633,7 +633,7 @@ out: | |||
633 | * All directory operations under NFS are synchronous, so fsync() | 633 | * All directory operations under NFS are synchronous, so fsync() |
634 | * is a dummy operation. | 634 | * is a dummy operation. |
635 | */ | 635 | */ |
636 | int nfs_fsync_dir(struct file *filp, struct dentry *dentry, int datasync) | 636 | static int nfs_fsync_dir(struct file *filp, struct dentry *dentry, int datasync) |
637 | { | 637 | { |
638 | dfprintk(VFS, "NFS: fsync_dir(%s/%s) datasync %d\n", | 638 | dfprintk(VFS, "NFS: fsync_dir(%s/%s) datasync %d\n", |
639 | dentry->d_parent->d_name.name, dentry->d_name.name, | 639 | dentry->d_parent->d_name.name, dentry->d_name.name, |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index d6a30e965787..648e0ac0f90e 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -790,7 +790,7 @@ out: | |||
790 | return -EACCES; | 790 | return -EACCES; |
791 | } | 791 | } |
792 | 792 | ||
793 | int nfs4_recover_expired_lease(struct nfs_server *server) | 793 | static int nfs4_recover_expired_lease(struct nfs_server *server) |
794 | { | 794 | { |
795 | struct nfs_client *clp = server->nfs_client; | 795 | struct nfs_client *clp = server->nfs_client; |
796 | int ret; | 796 | int ret; |
@@ -2748,7 +2748,7 @@ static int nfs4_delay(struct rpc_clnt *clnt, long *timeout) | |||
2748 | /* This is the error handling routine for processes that are allowed | 2748 | /* This is the error handling routine for processes that are allowed |
2749 | * to sleep. | 2749 | * to sleep. |
2750 | */ | 2750 | */ |
2751 | int nfs4_handle_exception(const struct nfs_server *server, int errorcode, struct nfs4_exception *exception) | 2751 | static int nfs4_handle_exception(const struct nfs_server *server, int errorcode, struct nfs4_exception *exception) |
2752 | { | 2752 | { |
2753 | struct nfs_client *clp = server->nfs_client; | 2753 | struct nfs_client *clp = server->nfs_client; |
2754 | int ret = errorcode; | 2754 | int ret = errorcode; |
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c index 5fffbdfa971f..8ed79d5c54f9 100644 --- a/fs/nfs/nfs4state.c +++ b/fs/nfs/nfs4state.c | |||
@@ -104,7 +104,7 @@ struct rpc_cred *nfs4_get_renew_cred(struct nfs_client *clp) | |||
104 | return cred; | 104 | return cred; |
105 | } | 105 | } |
106 | 106 | ||
107 | struct rpc_cred *nfs4_get_setclientid_cred(struct nfs_client *clp) | 107 | static struct rpc_cred *nfs4_get_setclientid_cred(struct nfs_client *clp) |
108 | { | 108 | { |
109 | struct nfs4_state_owner *sp; | 109 | struct nfs4_state_owner *sp; |
110 | 110 | ||
diff --git a/fs/nfs/nfs4xdr.c b/fs/nfs/nfs4xdr.c index 938f37166788..8003c91ccb9a 100644 --- a/fs/nfs/nfs4xdr.c +++ b/fs/nfs/nfs4xdr.c | |||
@@ -646,10 +646,10 @@ static int encode_close(struct xdr_stream *xdr, const struct nfs_closeargs *arg) | |||
646 | { | 646 | { |
647 | __be32 *p; | 647 | __be32 *p; |
648 | 648 | ||
649 | RESERVE_SPACE(8+sizeof(arg->stateid->data)); | 649 | RESERVE_SPACE(8+NFS4_STATEID_SIZE); |
650 | WRITE32(OP_CLOSE); | 650 | WRITE32(OP_CLOSE); |
651 | WRITE32(arg->seqid->sequence->counter); | 651 | WRITE32(arg->seqid->sequence->counter); |
652 | WRITEMEM(arg->stateid->data, sizeof(arg->stateid->data)); | 652 | WRITEMEM(arg->stateid->data, NFS4_STATEID_SIZE); |
653 | 653 | ||
654 | return 0; | 654 | return 0; |
655 | } | 655 | } |
@@ -793,17 +793,17 @@ static int encode_lock(struct xdr_stream *xdr, const struct nfs_lock_args *args) | |||
793 | WRITE64(nfs4_lock_length(args->fl)); | 793 | WRITE64(nfs4_lock_length(args->fl)); |
794 | WRITE32(args->new_lock_owner); | 794 | WRITE32(args->new_lock_owner); |
795 | if (args->new_lock_owner){ | 795 | if (args->new_lock_owner){ |
796 | RESERVE_SPACE(40); | 796 | RESERVE_SPACE(4+NFS4_STATEID_SIZE+20); |
797 | WRITE32(args->open_seqid->sequence->counter); | 797 | WRITE32(args->open_seqid->sequence->counter); |
798 | WRITEMEM(args->open_stateid->data, sizeof(args->open_stateid->data)); | 798 | WRITEMEM(args->open_stateid->data, NFS4_STATEID_SIZE); |
799 | WRITE32(args->lock_seqid->sequence->counter); | 799 | WRITE32(args->lock_seqid->sequence->counter); |
800 | WRITE64(args->lock_owner.clientid); | 800 | WRITE64(args->lock_owner.clientid); |
801 | WRITE32(4); | 801 | WRITE32(4); |
802 | WRITE32(args->lock_owner.id); | 802 | WRITE32(args->lock_owner.id); |
803 | } | 803 | } |
804 | else { | 804 | else { |
805 | RESERVE_SPACE(20); | 805 | RESERVE_SPACE(NFS4_STATEID_SIZE+4); |
806 | WRITEMEM(args->lock_stateid->data, sizeof(args->lock_stateid->data)); | 806 | WRITEMEM(args->lock_stateid->data, NFS4_STATEID_SIZE); |
807 | WRITE32(args->lock_seqid->sequence->counter); | 807 | WRITE32(args->lock_seqid->sequence->counter); |
808 | } | 808 | } |
809 | 809 | ||
@@ -830,11 +830,11 @@ static int encode_locku(struct xdr_stream *xdr, const struct nfs_locku_args *arg | |||
830 | { | 830 | { |
831 | __be32 *p; | 831 | __be32 *p; |
832 | 832 | ||
833 | RESERVE_SPACE(44); | 833 | RESERVE_SPACE(12+NFS4_STATEID_SIZE+16); |
834 | WRITE32(OP_LOCKU); | 834 | WRITE32(OP_LOCKU); |
835 | WRITE32(nfs4_lock_type(args->fl, 0)); | 835 | WRITE32(nfs4_lock_type(args->fl, 0)); |
836 | WRITE32(args->seqid->sequence->counter); | 836 | WRITE32(args->seqid->sequence->counter); |
837 | WRITEMEM(args->stateid->data, sizeof(args->stateid->data)); | 837 | WRITEMEM(args->stateid->data, NFS4_STATEID_SIZE); |
838 | WRITE64(args->fl->fl_start); | 838 | WRITE64(args->fl->fl_start); |
839 | WRITE64(nfs4_lock_length(args->fl)); | 839 | WRITE64(nfs4_lock_length(args->fl)); |
840 | 840 | ||
@@ -966,9 +966,9 @@ static inline void encode_claim_delegate_cur(struct xdr_stream *xdr, const struc | |||
966 | { | 966 | { |
967 | __be32 *p; | 967 | __be32 *p; |
968 | 968 | ||
969 | RESERVE_SPACE(4+sizeof(stateid->data)); | 969 | RESERVE_SPACE(4+NFS4_STATEID_SIZE); |
970 | WRITE32(NFS4_OPEN_CLAIM_DELEGATE_CUR); | 970 | WRITE32(NFS4_OPEN_CLAIM_DELEGATE_CUR); |
971 | WRITEMEM(stateid->data, sizeof(stateid->data)); | 971 | WRITEMEM(stateid->data, NFS4_STATEID_SIZE); |
972 | encode_string(xdr, name->len, name->name); | 972 | encode_string(xdr, name->len, name->name); |
973 | } | 973 | } |
974 | 974 | ||
@@ -996,9 +996,9 @@ static int encode_open_confirm(struct xdr_stream *xdr, const struct nfs_open_con | |||
996 | { | 996 | { |
997 | __be32 *p; | 997 | __be32 *p; |
998 | 998 | ||
999 | RESERVE_SPACE(8+sizeof(arg->stateid->data)); | 999 | RESERVE_SPACE(4+NFS4_STATEID_SIZE+4); |
1000 | WRITE32(OP_OPEN_CONFIRM); | 1000 | WRITE32(OP_OPEN_CONFIRM); |
1001 | WRITEMEM(arg->stateid->data, sizeof(arg->stateid->data)); | 1001 | WRITEMEM(arg->stateid->data, NFS4_STATEID_SIZE); |
1002 | WRITE32(arg->seqid->sequence->counter); | 1002 | WRITE32(arg->seqid->sequence->counter); |
1003 | 1003 | ||
1004 | return 0; | 1004 | return 0; |
@@ -1008,9 +1008,9 @@ static int encode_open_downgrade(struct xdr_stream *xdr, const struct nfs_closea | |||
1008 | { | 1008 | { |
1009 | __be32 *p; | 1009 | __be32 *p; |
1010 | 1010 | ||
1011 | RESERVE_SPACE(8+sizeof(arg->stateid->data)); | 1011 | RESERVE_SPACE(4+NFS4_STATEID_SIZE+4); |
1012 | WRITE32(OP_OPEN_DOWNGRADE); | 1012 | WRITE32(OP_OPEN_DOWNGRADE); |
1013 | WRITEMEM(arg->stateid->data, sizeof(arg->stateid->data)); | 1013 | WRITEMEM(arg->stateid->data, NFS4_STATEID_SIZE); |
1014 | WRITE32(arg->seqid->sequence->counter); | 1014 | WRITE32(arg->seqid->sequence->counter); |
1015 | encode_share_access(xdr, arg->open_flags); | 1015 | encode_share_access(xdr, arg->open_flags); |
1016 | return 0; | 1016 | return 0; |
@@ -1045,12 +1045,12 @@ static void encode_stateid(struct xdr_stream *xdr, const struct nfs_open_context | |||
1045 | nfs4_stateid stateid; | 1045 | nfs4_stateid stateid; |
1046 | __be32 *p; | 1046 | __be32 *p; |
1047 | 1047 | ||
1048 | RESERVE_SPACE(16); | 1048 | RESERVE_SPACE(NFS4_STATEID_SIZE); |
1049 | if (ctx->state != NULL) { | 1049 | if (ctx->state != NULL) { |
1050 | nfs4_copy_stateid(&stateid, ctx->state, ctx->lockowner); | 1050 | nfs4_copy_stateid(&stateid, ctx->state, ctx->lockowner); |
1051 | WRITEMEM(stateid.data, sizeof(stateid.data)); | 1051 | WRITEMEM(stateid.data, NFS4_STATEID_SIZE); |
1052 | } else | 1052 | } else |
1053 | WRITEMEM(zero_stateid.data, sizeof(zero_stateid.data)); | 1053 | WRITEMEM(zero_stateid.data, NFS4_STATEID_SIZE); |
1054 | } | 1054 | } |
1055 | 1055 | ||
1056 | static int encode_read(struct xdr_stream *xdr, const struct nfs_readargs *args) | 1056 | static int encode_read(struct xdr_stream *xdr, const struct nfs_readargs *args) |
@@ -1079,10 +1079,10 @@ static int encode_readdir(struct xdr_stream *xdr, const struct nfs4_readdir_arg | |||
1079 | int replen; | 1079 | int replen; |
1080 | __be32 *p; | 1080 | __be32 *p; |
1081 | 1081 | ||
1082 | RESERVE_SPACE(32+sizeof(nfs4_verifier)); | 1082 | RESERVE_SPACE(12+NFS4_VERIFIER_SIZE+20); |
1083 | WRITE32(OP_READDIR); | 1083 | WRITE32(OP_READDIR); |
1084 | WRITE64(readdir->cookie); | 1084 | WRITE64(readdir->cookie); |
1085 | WRITEMEM(readdir->verifier.data, sizeof(readdir->verifier.data)); | 1085 | WRITEMEM(readdir->verifier.data, NFS4_VERIFIER_SIZE); |
1086 | WRITE32(readdir->count >> 1); /* We're not doing readdirplus */ | 1086 | WRITE32(readdir->count >> 1); /* We're not doing readdirplus */ |
1087 | WRITE32(readdir->count); | 1087 | WRITE32(readdir->count); |
1088 | WRITE32(2); | 1088 | WRITE32(2); |
@@ -1190,9 +1190,9 @@ encode_setacl(struct xdr_stream *xdr, struct nfs_setaclargs *arg) | |||
1190 | { | 1190 | { |
1191 | __be32 *p; | 1191 | __be32 *p; |
1192 | 1192 | ||
1193 | RESERVE_SPACE(4+sizeof(zero_stateid.data)); | 1193 | RESERVE_SPACE(4+NFS4_STATEID_SIZE); |
1194 | WRITE32(OP_SETATTR); | 1194 | WRITE32(OP_SETATTR); |
1195 | WRITEMEM(zero_stateid.data, sizeof(zero_stateid.data)); | 1195 | WRITEMEM(zero_stateid.data, NFS4_STATEID_SIZE); |
1196 | RESERVE_SPACE(2*4); | 1196 | RESERVE_SPACE(2*4); |
1197 | WRITE32(1); | 1197 | WRITE32(1); |
1198 | WRITE32(FATTR4_WORD0_ACL); | 1198 | WRITE32(FATTR4_WORD0_ACL); |
@@ -1220,9 +1220,9 @@ static int encode_setattr(struct xdr_stream *xdr, const struct nfs_setattrargs * | |||
1220 | int status; | 1220 | int status; |
1221 | __be32 *p; | 1221 | __be32 *p; |
1222 | 1222 | ||
1223 | RESERVE_SPACE(4+sizeof(arg->stateid.data)); | 1223 | RESERVE_SPACE(4+NFS4_STATEID_SIZE); |
1224 | WRITE32(OP_SETATTR); | 1224 | WRITE32(OP_SETATTR); |
1225 | WRITEMEM(arg->stateid.data, sizeof(arg->stateid.data)); | 1225 | WRITEMEM(arg->stateid.data, NFS4_STATEID_SIZE); |
1226 | 1226 | ||
1227 | if ((status = encode_attrs(xdr, arg->iap, server))) | 1227 | if ((status = encode_attrs(xdr, arg->iap, server))) |
1228 | return status; | 1228 | return status; |
@@ -1234,9 +1234,9 @@ static int encode_setclientid(struct xdr_stream *xdr, const struct nfs4_setclien | |||
1234 | { | 1234 | { |
1235 | __be32 *p; | 1235 | __be32 *p; |
1236 | 1236 | ||
1237 | RESERVE_SPACE(4 + sizeof(setclientid->sc_verifier->data)); | 1237 | RESERVE_SPACE(4 + NFS4_VERIFIER_SIZE); |
1238 | WRITE32(OP_SETCLIENTID); | 1238 | WRITE32(OP_SETCLIENTID); |
1239 | WRITEMEM(setclientid->sc_verifier->data, sizeof(setclientid->sc_verifier->data)); | 1239 | WRITEMEM(setclientid->sc_verifier->data, NFS4_VERIFIER_SIZE); |
1240 | 1240 | ||
1241 | encode_string(xdr, setclientid->sc_name_len, setclientid->sc_name); | 1241 | encode_string(xdr, setclientid->sc_name_len, setclientid->sc_name); |
1242 | RESERVE_SPACE(4); | 1242 | RESERVE_SPACE(4); |
@@ -1253,10 +1253,10 @@ static int encode_setclientid_confirm(struct xdr_stream *xdr, const struct nfs_c | |||
1253 | { | 1253 | { |
1254 | __be32 *p; | 1254 | __be32 *p; |
1255 | 1255 | ||
1256 | RESERVE_SPACE(12 + sizeof(client_state->cl_confirm.data)); | 1256 | RESERVE_SPACE(12 + NFS4_VERIFIER_SIZE); |
1257 | WRITE32(OP_SETCLIENTID_CONFIRM); | 1257 | WRITE32(OP_SETCLIENTID_CONFIRM); |
1258 | WRITE64(client_state->cl_clientid); | 1258 | WRITE64(client_state->cl_clientid); |
1259 | WRITEMEM(client_state->cl_confirm.data, sizeof(client_state->cl_confirm.data)); | 1259 | WRITEMEM(client_state->cl_confirm.data, NFS4_VERIFIER_SIZE); |
1260 | 1260 | ||
1261 | return 0; | 1261 | return 0; |
1262 | } | 1262 | } |
@@ -1284,10 +1284,10 @@ static int encode_delegreturn(struct xdr_stream *xdr, const nfs4_stateid *statei | |||
1284 | { | 1284 | { |
1285 | __be32 *p; | 1285 | __be32 *p; |
1286 | 1286 | ||
1287 | RESERVE_SPACE(20); | 1287 | RESERVE_SPACE(4+NFS4_STATEID_SIZE); |
1288 | 1288 | ||
1289 | WRITE32(OP_DELEGRETURN); | 1289 | WRITE32(OP_DELEGRETURN); |
1290 | WRITEMEM(stateid->data, sizeof(stateid->data)); | 1290 | WRITEMEM(stateid->data, NFS4_STATEID_SIZE); |
1291 | return 0; | 1291 | return 0; |
1292 | 1292 | ||
1293 | } | 1293 | } |
@@ -2494,7 +2494,7 @@ static int decode_attr_fs_locations(struct xdr_stream *xdr, uint32_t *bitmap, st | |||
2494 | int i; | 2494 | int i; |
2495 | dprintk("%s: using first %d of %d servers returned for location %d\n", __FUNCTION__, NFS4_FS_LOCATION_MAXSERVERS, m, res->nlocations); | 2495 | dprintk("%s: using first %d of %d servers returned for location %d\n", __FUNCTION__, NFS4_FS_LOCATION_MAXSERVERS, m, res->nlocations); |
2496 | for (i = loc->nservers; i < m; i++) { | 2496 | for (i = loc->nservers; i < m; i++) { |
2497 | int len; | 2497 | unsigned int len; |
2498 | char *data; | 2498 | char *data; |
2499 | status = decode_opaque_inline(xdr, &len, &data); | 2499 | status = decode_opaque_inline(xdr, &len, &data); |
2500 | if (unlikely(status != 0)) | 2500 | if (unlikely(status != 0)) |
@@ -2642,7 +2642,7 @@ static int decode_attr_nlink(struct xdr_stream *xdr, uint32_t *bitmap, uint32_t | |||
2642 | return 0; | 2642 | return 0; |
2643 | } | 2643 | } |
2644 | 2644 | ||
2645 | static int decode_attr_owner(struct xdr_stream *xdr, uint32_t *bitmap, struct nfs_client *clp, int32_t *uid) | 2645 | static int decode_attr_owner(struct xdr_stream *xdr, uint32_t *bitmap, struct nfs_client *clp, uint32_t *uid) |
2646 | { | 2646 | { |
2647 | uint32_t len; | 2647 | uint32_t len; |
2648 | __be32 *p; | 2648 | __be32 *p; |
@@ -2667,7 +2667,7 @@ static int decode_attr_owner(struct xdr_stream *xdr, uint32_t *bitmap, struct nf | |||
2667 | return 0; | 2667 | return 0; |
2668 | } | 2668 | } |
2669 | 2669 | ||
2670 | static int decode_attr_group(struct xdr_stream *xdr, uint32_t *bitmap, struct nfs_client *clp, int32_t *gid) | 2670 | static int decode_attr_group(struct xdr_stream *xdr, uint32_t *bitmap, struct nfs_client *clp, uint32_t *gid) |
2671 | { | 2671 | { |
2672 | uint32_t len; | 2672 | uint32_t len; |
2673 | __be32 *p; | 2673 | __be32 *p; |
@@ -2897,8 +2897,8 @@ static int decode_close(struct xdr_stream *xdr, struct nfs_closeres *res) | |||
2897 | status = decode_op_hdr(xdr, OP_CLOSE); | 2897 | status = decode_op_hdr(xdr, OP_CLOSE); |
2898 | if (status) | 2898 | if (status) |
2899 | return status; | 2899 | return status; |
2900 | READ_BUF(sizeof(res->stateid.data)); | 2900 | READ_BUF(NFS4_STATEID_SIZE); |
2901 | COPYMEM(res->stateid.data, sizeof(res->stateid.data)); | 2901 | COPYMEM(res->stateid.data, NFS4_STATEID_SIZE); |
2902 | return 0; | 2902 | return 0; |
2903 | } | 2903 | } |
2904 | 2904 | ||
@@ -3186,8 +3186,8 @@ static int decode_lock(struct xdr_stream *xdr, struct nfs_lock_res *res) | |||
3186 | 3186 | ||
3187 | status = decode_op_hdr(xdr, OP_LOCK); | 3187 | status = decode_op_hdr(xdr, OP_LOCK); |
3188 | if (status == 0) { | 3188 | if (status == 0) { |
3189 | READ_BUF(sizeof(res->stateid.data)); | 3189 | READ_BUF(NFS4_STATEID_SIZE); |
3190 | COPYMEM(res->stateid.data, sizeof(res->stateid.data)); | 3190 | COPYMEM(res->stateid.data, NFS4_STATEID_SIZE); |
3191 | } else if (status == -NFS4ERR_DENIED) | 3191 | } else if (status == -NFS4ERR_DENIED) |
3192 | return decode_lock_denied(xdr, NULL); | 3192 | return decode_lock_denied(xdr, NULL); |
3193 | return status; | 3193 | return status; |
@@ -3209,8 +3209,8 @@ static int decode_locku(struct xdr_stream *xdr, struct nfs_locku_res *res) | |||
3209 | 3209 | ||
3210 | status = decode_op_hdr(xdr, OP_LOCKU); | 3210 | status = decode_op_hdr(xdr, OP_LOCKU); |
3211 | if (status == 0) { | 3211 | if (status == 0) { |
3212 | READ_BUF(sizeof(res->stateid.data)); | 3212 | READ_BUF(NFS4_STATEID_SIZE); |
3213 | COPYMEM(res->stateid.data, sizeof(res->stateid.data)); | 3213 | COPYMEM(res->stateid.data, NFS4_STATEID_SIZE); |
3214 | } | 3214 | } |
3215 | return status; | 3215 | return status; |
3216 | } | 3216 | } |
@@ -3251,8 +3251,8 @@ static int decode_delegation(struct xdr_stream *xdr, struct nfs_openres *res) | |||
3251 | res->delegation_type = 0; | 3251 | res->delegation_type = 0; |
3252 | return 0; | 3252 | return 0; |
3253 | } | 3253 | } |
3254 | READ_BUF(20); | 3254 | READ_BUF(NFS4_STATEID_SIZE+4); |
3255 | COPYMEM(res->delegation.data, sizeof(res->delegation.data)); | 3255 | COPYMEM(res->delegation.data, NFS4_STATEID_SIZE); |
3256 | READ32(res->do_recall); | 3256 | READ32(res->do_recall); |
3257 | switch (delegation_type) { | 3257 | switch (delegation_type) { |
3258 | case NFS4_OPEN_DELEGATE_READ: | 3258 | case NFS4_OPEN_DELEGATE_READ: |
@@ -3275,8 +3275,8 @@ static int decode_open(struct xdr_stream *xdr, struct nfs_openres *res) | |||
3275 | status = decode_op_hdr(xdr, OP_OPEN); | 3275 | status = decode_op_hdr(xdr, OP_OPEN); |
3276 | if (status) | 3276 | if (status) |
3277 | return status; | 3277 | return status; |
3278 | READ_BUF(sizeof(res->stateid.data)); | 3278 | READ_BUF(NFS4_STATEID_SIZE); |
3279 | COPYMEM(res->stateid.data, sizeof(res->stateid.data)); | 3279 | COPYMEM(res->stateid.data, NFS4_STATEID_SIZE); |
3280 | 3280 | ||
3281 | decode_change_info(xdr, &res->cinfo); | 3281 | decode_change_info(xdr, &res->cinfo); |
3282 | 3282 | ||
@@ -3302,8 +3302,8 @@ static int decode_open_confirm(struct xdr_stream *xdr, struct nfs_open_confirmre | |||
3302 | status = decode_op_hdr(xdr, OP_OPEN_CONFIRM); | 3302 | status = decode_op_hdr(xdr, OP_OPEN_CONFIRM); |
3303 | if (status) | 3303 | if (status) |
3304 | return status; | 3304 | return status; |
3305 | READ_BUF(sizeof(res->stateid.data)); | 3305 | READ_BUF(NFS4_STATEID_SIZE); |
3306 | COPYMEM(res->stateid.data, sizeof(res->stateid.data)); | 3306 | COPYMEM(res->stateid.data, NFS4_STATEID_SIZE); |
3307 | return 0; | 3307 | return 0; |
3308 | } | 3308 | } |
3309 | 3309 | ||
@@ -3315,8 +3315,8 @@ static int decode_open_downgrade(struct xdr_stream *xdr, struct nfs_closeres *re | |||
3315 | status = decode_op_hdr(xdr, OP_OPEN_DOWNGRADE); | 3315 | status = decode_op_hdr(xdr, OP_OPEN_DOWNGRADE); |
3316 | if (status) | 3316 | if (status) |
3317 | return status; | 3317 | return status; |
3318 | READ_BUF(sizeof(res->stateid.data)); | 3318 | READ_BUF(NFS4_STATEID_SIZE); |
3319 | COPYMEM(res->stateid.data, sizeof(res->stateid.data)); | 3319 | COPYMEM(res->stateid.data, NFS4_STATEID_SIZE); |
3320 | return 0; | 3320 | return 0; |
3321 | } | 3321 | } |
3322 | 3322 | ||
@@ -3590,9 +3590,9 @@ static int decode_setclientid(struct xdr_stream *xdr, struct nfs_client *clp) | |||
3590 | } | 3590 | } |
3591 | READ32(nfserr); | 3591 | READ32(nfserr); |
3592 | if (nfserr == NFS_OK) { | 3592 | if (nfserr == NFS_OK) { |
3593 | READ_BUF(8 + sizeof(clp->cl_confirm.data)); | 3593 | READ_BUF(8 + NFS4_VERIFIER_SIZE); |
3594 | READ64(clp->cl_clientid); | 3594 | READ64(clp->cl_clientid); |
3595 | COPYMEM(clp->cl_confirm.data, sizeof(clp->cl_confirm.data)); | 3595 | COPYMEM(clp->cl_confirm.data, NFS4_VERIFIER_SIZE); |
3596 | } else if (nfserr == NFSERR_CLID_INUSE) { | 3596 | } else if (nfserr == NFSERR_CLID_INUSE) { |
3597 | uint32_t len; | 3597 | uint32_t len; |
3598 | 3598 | ||
diff --git a/fs/nfs/read.c b/fs/nfs/read.c index 9a55807b2a70..7bd7cb95c034 100644 --- a/fs/nfs/read.c +++ b/fs/nfs/read.c | |||
@@ -79,7 +79,7 @@ void nfs_readdata_release(void *data) | |||
79 | static | 79 | static |
80 | int nfs_return_empty_page(struct page *page) | 80 | int nfs_return_empty_page(struct page *page) |
81 | { | 81 | { |
82 | memclear_highpage_flush(page, 0, PAGE_CACHE_SIZE); | 82 | zero_user_page(page, 0, PAGE_CACHE_SIZE, KM_USER0); |
83 | SetPageUptodate(page); | 83 | SetPageUptodate(page); |
84 | unlock_page(page); | 84 | unlock_page(page); |
85 | return 0; | 85 | return 0; |
@@ -103,10 +103,10 @@ static void nfs_readpage_truncate_uninitialised_page(struct nfs_read_data *data) | |||
103 | pglen = PAGE_CACHE_SIZE - base; | 103 | pglen = PAGE_CACHE_SIZE - base; |
104 | for (;;) { | 104 | for (;;) { |
105 | if (remainder <= pglen) { | 105 | if (remainder <= pglen) { |
106 | memclear_highpage_flush(*pages, base, remainder); | 106 | zero_user_page(*pages, base, remainder, KM_USER0); |
107 | break; | 107 | break; |
108 | } | 108 | } |
109 | memclear_highpage_flush(*pages, base, pglen); | 109 | zero_user_page(*pages, base, pglen, KM_USER0); |
110 | pages++; | 110 | pages++; |
111 | remainder -= pglen; | 111 | remainder -= pglen; |
112 | pglen = PAGE_CACHE_SIZE; | 112 | pglen = PAGE_CACHE_SIZE; |
@@ -130,7 +130,7 @@ static int nfs_readpage_async(struct nfs_open_context *ctx, struct inode *inode, | |||
130 | return PTR_ERR(new); | 130 | return PTR_ERR(new); |
131 | } | 131 | } |
132 | if (len < PAGE_CACHE_SIZE) | 132 | if (len < PAGE_CACHE_SIZE) |
133 | memclear_highpage_flush(page, len, PAGE_CACHE_SIZE - len); | 133 | zero_user_page(page, len, PAGE_CACHE_SIZE - len, KM_USER0); |
134 | 134 | ||
135 | nfs_list_add_request(new, &one_request); | 135 | nfs_list_add_request(new, &one_request); |
136 | if (NFS_SERVER(inode)->rsize < PAGE_CACHE_SIZE) | 136 | if (NFS_SERVER(inode)->rsize < PAGE_CACHE_SIZE) |
@@ -532,7 +532,7 @@ readpage_async_filler(void *data, struct page *page) | |||
532 | return PTR_ERR(new); | 532 | return PTR_ERR(new); |
533 | } | 533 | } |
534 | if (len < PAGE_CACHE_SIZE) | 534 | if (len < PAGE_CACHE_SIZE) |
535 | memclear_highpage_flush(page, len, PAGE_CACHE_SIZE - len); | 535 | zero_user_page(page, len, PAGE_CACHE_SIZE - len, KM_USER0); |
536 | nfs_pageio_add_request(desc->pgio, new); | 536 | nfs_pageio_add_request(desc->pgio, new); |
537 | return 0; | 537 | return 0; |
538 | } | 538 | } |
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index de92b9509d94..b084c03ce493 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c | |||
@@ -58,7 +58,7 @@ struct nfs_write_data *nfs_commit_alloc(void) | |||
58 | return p; | 58 | return p; |
59 | } | 59 | } |
60 | 60 | ||
61 | void nfs_commit_rcu_free(struct rcu_head *head) | 61 | static void nfs_commit_rcu_free(struct rcu_head *head) |
62 | { | 62 | { |
63 | struct nfs_write_data *p = container_of(head, struct nfs_write_data, task.u.tk_rcu); | 63 | struct nfs_write_data *p = container_of(head, struct nfs_write_data, task.u.tk_rcu); |
64 | if (p && (p->pagevec != &p->page_array[0])) | 64 | if (p && (p->pagevec != &p->page_array[0])) |
@@ -168,7 +168,7 @@ static void nfs_mark_uptodate(struct page *page, unsigned int base, unsigned int | |||
168 | if (count != nfs_page_length(page)) | 168 | if (count != nfs_page_length(page)) |
169 | return; | 169 | return; |
170 | if (count != PAGE_CACHE_SIZE) | 170 | if (count != PAGE_CACHE_SIZE) |
171 | memclear_highpage_flush(page, count, PAGE_CACHE_SIZE - count); | 171 | zero_user_page(page, count, PAGE_CACHE_SIZE - count, KM_USER0); |
172 | SetPageUptodate(page); | 172 | SetPageUptodate(page); |
173 | } | 173 | } |
174 | 174 | ||
@@ -922,7 +922,7 @@ static int nfs_flush_one(struct inode *inode, struct list_head *head, unsigned i | |||
922 | return 0; | 922 | return 0; |
923 | out_bad: | 923 | out_bad: |
924 | while (!list_empty(head)) { | 924 | while (!list_empty(head)) { |
925 | struct nfs_page *req = nfs_list_entry(head->next); | 925 | req = nfs_list_entry(head->next); |
926 | nfs_list_remove_request(req); | 926 | nfs_list_remove_request(req); |
927 | nfs_redirty_request(req); | 927 | nfs_redirty_request(req); |
928 | nfs_end_page_writeback(req->wb_page); | 928 | nfs_end_page_writeback(req->wb_page); |