diff options
| -rw-r--r-- | drivers/staging/android/ashmem.c | 2 | ||||
| -rw-r--r-- | fs/ioctl.c | 2 | ||||
| -rw-r--r-- | fs/lockd/mon.c | 2 | ||||
| -rw-r--r-- | fs/lockd/svc.c | 2 | ||||
| -rw-r--r-- | fs/nfsd/nfs4proc.c | 57 | ||||
| -rw-r--r-- | fs/nfsd/nfs4state.c | 68 | ||||
| -rw-r--r-- | fs/nfsd/nfs4xdr.c | 34 | ||||
| -rw-r--r-- | fs/nfsd/nfscache.c | 4 | ||||
| -rw-r--r-- | fs/nfsd/nfsctl.c | 6 | ||||
| -rw-r--r-- | fs/nfsd/nfsfh.c | 2 | ||||
| -rw-r--r-- | fs/nfsd/nfssvc.c | 2 | ||||
| -rw-r--r-- | fs/nfsd/state.h | 19 | ||||
| -rw-r--r-- | fs/nfsd/vfs.c | 37 | ||||
| -rw-r--r-- | fs/nfsd/vfs.h | 2 | ||||
| -rw-r--r-- | fs/nfsd/xdr4.h | 9 | ||||
| -rw-r--r-- | fs/open.c | 5 | ||||
| -rw-r--r-- | include/linux/fs.h | 2 | ||||
| -rw-r--r-- | include/linux/sunrpc/svc.h | 34 | ||||
| -rw-r--r-- | include/linux/sunrpc/svc_xprt.h | 7 | ||||
| -rw-r--r-- | include/trace/events/sunrpc.h | 120 | ||||
| -rw-r--r-- | mm/madvise.c | 2 | ||||
| -rw-r--r-- | net/sunrpc/auth_gss/svcauth_gss.c | 2 | ||||
| -rw-r--r-- | net/sunrpc/cache.c | 26 | ||||
| -rw-r--r-- | net/sunrpc/svc.c | 42 | ||||
| -rw-r--r-- | net/sunrpc/svc_xprt.c | 292 | ||||
| -rw-r--r-- | net/sunrpc/svcsock.c | 5 | ||||
| -rw-r--r-- | net/sunrpc/xdr.c | 9 |
27 files changed, 525 insertions, 269 deletions
diff --git a/drivers/staging/android/ashmem.c b/drivers/staging/android/ashmem.c index 46f8ef42559e..8c7852742f4b 100644 --- a/drivers/staging/android/ashmem.c +++ b/drivers/staging/android/ashmem.c | |||
| @@ -446,7 +446,7 @@ ashmem_shrink_scan(struct shrinker *shrink, struct shrink_control *sc) | |||
| 446 | loff_t start = range->pgstart * PAGE_SIZE; | 446 | loff_t start = range->pgstart * PAGE_SIZE; |
| 447 | loff_t end = (range->pgend + 1) * PAGE_SIZE; | 447 | loff_t end = (range->pgend + 1) * PAGE_SIZE; |
| 448 | 448 | ||
| 449 | do_fallocate(range->asma->file, | 449 | vfs_fallocate(range->asma->file, |
| 450 | FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, | 450 | FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE, |
| 451 | start, end - start); | 451 | start, end - start); |
| 452 | range->purged = ASHMEM_WAS_PURGED; | 452 | range->purged = ASHMEM_WAS_PURGED; |
diff --git a/fs/ioctl.c b/fs/ioctl.c index 77c9a7812542..214c3c11fbc2 100644 --- a/fs/ioctl.c +++ b/fs/ioctl.c | |||
| @@ -443,7 +443,7 @@ int ioctl_preallocate(struct file *filp, void __user *argp) | |||
| 443 | return -EINVAL; | 443 | return -EINVAL; |
| 444 | } | 444 | } |
| 445 | 445 | ||
| 446 | return do_fallocate(filp, FALLOC_FL_KEEP_SIZE, sr.l_start, sr.l_len); | 446 | return vfs_fallocate(filp, FALLOC_FL_KEEP_SIZE, sr.l_start, sr.l_len); |
| 447 | } | 447 | } |
| 448 | 448 | ||
| 449 | static int file_ioctl(struct file *filp, unsigned int cmd, | 449 | static int file_ioctl(struct file *filp, unsigned int cmd, |
diff --git a/fs/lockd/mon.c b/fs/lockd/mon.c index 9106f42c472c..1cc6ec51e6b1 100644 --- a/fs/lockd/mon.c +++ b/fs/lockd/mon.c | |||
| @@ -214,7 +214,7 @@ int nsm_monitor(const struct nlm_host *host) | |||
| 214 | if (unlikely(res.status != 0)) | 214 | if (unlikely(res.status != 0)) |
| 215 | status = -EIO; | 215 | status = -EIO; |
| 216 | if (unlikely(status < 0)) { | 216 | if (unlikely(status < 0)) { |
| 217 | printk(KERN_NOTICE "lockd: cannot monitor %s\n", nsm->sm_name); | 217 | pr_notice_ratelimited("lockd: cannot monitor %s\n", nsm->sm_name); |
| 218 | return status; | 218 | return status; |
| 219 | } | 219 | } |
| 220 | 220 | ||
diff --git a/fs/lockd/svc.c b/fs/lockd/svc.c index d1bb7ecfd201..e94c887da2d7 100644 --- a/fs/lockd/svc.c +++ b/fs/lockd/svc.c | |||
| @@ -350,7 +350,7 @@ static struct svc_serv *lockd_create_svc(void) | |||
| 350 | printk(KERN_WARNING | 350 | printk(KERN_WARNING |
| 351 | "lockd_up: no pid, %d users??\n", nlmsvc_users); | 351 | "lockd_up: no pid, %d users??\n", nlmsvc_users); |
| 352 | 352 | ||
| 353 | serv = svc_create(&nlmsvc_program, LOCKD_BUFSIZE, NULL); | 353 | serv = svc_create(&nlmsvc_program, LOCKD_BUFSIZE, svc_rpcb_cleanup); |
| 354 | if (!serv) { | 354 | if (!serv) { |
| 355 | printk(KERN_WARNING "lockd_up: create service failed\n"); | 355 | printk(KERN_WARNING "lockd_up: create service failed\n"); |
| 356 | return ERR_PTR(-ENOMEM); | 356 | return ERR_PTR(-ENOMEM); |
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 0beb023f25ac..ac71d13c69ef 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c | |||
| @@ -33,6 +33,7 @@ | |||
| 33 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 33 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 34 | */ | 34 | */ |
| 35 | #include <linux/file.h> | 35 | #include <linux/file.h> |
| 36 | #include <linux/falloc.h> | ||
| 36 | #include <linux/slab.h> | 37 | #include <linux/slab.h> |
| 37 | 38 | ||
| 38 | #include "idmap.h" | 39 | #include "idmap.h" |
| @@ -772,7 +773,7 @@ nfsd4_read(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
| 772 | * the client wants us to do more in this compound: | 773 | * the client wants us to do more in this compound: |
| 773 | */ | 774 | */ |
| 774 | if (!nfsd4_last_compound_op(rqstp)) | 775 | if (!nfsd4_last_compound_op(rqstp)) |
| 775 | rqstp->rq_splice_ok = false; | 776 | clear_bit(RQ_SPLICE_OK, &rqstp->rq_flags); |
| 776 | 777 | ||
| 777 | /* check stateid */ | 778 | /* check stateid */ |
| 778 | if ((status = nfs4_preprocess_stateid_op(SVC_NET(rqstp), | 779 | if ((status = nfs4_preprocess_stateid_op(SVC_NET(rqstp), |
| @@ -1014,6 +1015,44 @@ nfsd4_write(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | |||
| 1014 | } | 1015 | } |
| 1015 | 1016 | ||
| 1016 | static __be32 | 1017 | static __be32 |
| 1018 | nfsd4_fallocate(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | ||
| 1019 | struct nfsd4_fallocate *fallocate, int flags) | ||
| 1020 | { | ||
| 1021 | __be32 status = nfserr_notsupp; | ||
| 1022 | struct file *file; | ||
| 1023 | |||
| 1024 | status = nfs4_preprocess_stateid_op(SVC_NET(rqstp), cstate, | ||
| 1025 | &fallocate->falloc_stateid, | ||
| 1026 | WR_STATE, &file); | ||
| 1027 | if (status != nfs_ok) { | ||
| 1028 | dprintk("NFSD: nfsd4_fallocate: couldn't process stateid!\n"); | ||
| 1029 | return status; | ||
| 1030 | } | ||
| 1031 | |||
| 1032 | status = nfsd4_vfs_fallocate(rqstp, &cstate->current_fh, file, | ||
| 1033 | fallocate->falloc_offset, | ||
| 1034 | fallocate->falloc_length, | ||
| 1035 | flags); | ||
| 1036 | fput(file); | ||
| 1037 | return status; | ||
| 1038 | } | ||
| 1039 | |||
| 1040 | static __be32 | ||
| 1041 | nfsd4_allocate(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | ||
| 1042 | struct nfsd4_fallocate *fallocate) | ||
| 1043 | { | ||
| 1044 | return nfsd4_fallocate(rqstp, cstate, fallocate, 0); | ||
| 1045 | } | ||
| 1046 | |||
| 1047 | static __be32 | ||
| 1048 | nfsd4_deallocate(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | ||
| 1049 | struct nfsd4_fallocate *fallocate) | ||
| 1050 | { | ||
| 1051 | return nfsd4_fallocate(rqstp, cstate, fallocate, | ||
| 1052 | FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE); | ||
| 1053 | } | ||
| 1054 | |||
| 1055 | static __be32 | ||
| 1017 | nfsd4_seek(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, | 1056 | nfsd4_seek(struct svc_rqst *rqstp, struct nfsd4_compound_state *cstate, |
| 1018 | struct nfsd4_seek *seek) | 1057 | struct nfsd4_seek *seek) |
| 1019 | { | 1058 | { |
| @@ -1331,7 +1370,7 @@ nfsd4_proc_compound(struct svc_rqst *rqstp, | |||
| 1331 | * Don't use the deferral mechanism for NFSv4; compounds make it | 1370 | * Don't use the deferral mechanism for NFSv4; compounds make it |
| 1332 | * too hard to avoid non-idempotency problems. | 1371 | * too hard to avoid non-idempotency problems. |
| 1333 | */ | 1372 | */ |
| 1334 | rqstp->rq_usedeferral = false; | 1373 | clear_bit(RQ_USEDEFERRAL, &rqstp->rq_flags); |
| 1335 | 1374 | ||
| 1336 | /* | 1375 | /* |
| 1337 | * According to RFC3010, this takes precedence over all other errors. | 1376 | * According to RFC3010, this takes precedence over all other errors. |
| @@ -1447,7 +1486,7 @@ encode_op: | |||
| 1447 | BUG_ON(cstate->replay_owner); | 1486 | BUG_ON(cstate->replay_owner); |
| 1448 | out: | 1487 | out: |
| 1449 | /* Reset deferral mechanism for RPC deferrals */ | 1488 | /* Reset deferral mechanism for RPC deferrals */ |
| 1450 | rqstp->rq_usedeferral = true; | 1489 | set_bit(RQ_USEDEFERRAL, &rqstp->rq_flags); |
| 1451 | dprintk("nfsv4 compound returned %d\n", ntohl(status)); | 1490 | dprintk("nfsv4 compound returned %d\n", ntohl(status)); |
| 1452 | return status; | 1491 | return status; |
| 1453 | } | 1492 | } |
| @@ -1929,6 +1968,18 @@ static struct nfsd4_operation nfsd4_ops[] = { | |||
| 1929 | }, | 1968 | }, |
| 1930 | 1969 | ||
| 1931 | /* NFSv4.2 operations */ | 1970 | /* NFSv4.2 operations */ |
| 1971 | [OP_ALLOCATE] = { | ||
| 1972 | .op_func = (nfsd4op_func)nfsd4_allocate, | ||
| 1973 | .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME, | ||
| 1974 | .op_name = "OP_ALLOCATE", | ||
| 1975 | .op_rsize_bop = (nfsd4op_rsize)nfsd4_write_rsize, | ||
| 1976 | }, | ||
| 1977 | [OP_DEALLOCATE] = { | ||
| 1978 | .op_func = (nfsd4op_func)nfsd4_deallocate, | ||
| 1979 | .op_flags = OP_MODIFIES_SOMETHING | OP_CACHEME, | ||
| 1980 | .op_name = "OP_DEALLOCATE", | ||
| 1981 | .op_rsize_bop = (nfsd4op_rsize)nfsd4_write_rsize, | ||
| 1982 | }, | ||
| 1932 | [OP_SEEK] = { | 1983 | [OP_SEEK] = { |
| 1933 | .op_func = (nfsd4op_func)nfsd4_seek, | 1984 | .op_func = (nfsd4op_func)nfsd4_seek, |
| 1934 | .op_name = "OP_SEEK", | 1985 | .op_name = "OP_SEEK", |
diff --git a/fs/nfsd/nfs4state.c b/fs/nfsd/nfs4state.c index 4e1d7268b004..3550a9c87616 100644 --- a/fs/nfsd/nfs4state.c +++ b/fs/nfsd/nfs4state.c | |||
| @@ -275,9 +275,11 @@ opaque_hashval(const void *ptr, int nbytes) | |||
| 275 | return x; | 275 | return x; |
| 276 | } | 276 | } |
| 277 | 277 | ||
| 278 | static void nfsd4_free_file(struct nfs4_file *f) | 278 | static void nfsd4_free_file_rcu(struct rcu_head *rcu) |
| 279 | { | ||
