diff options
| -rw-r--r-- | fs/nfs/nfs4proc.c | 20 | ||||
| -rw-r--r-- | net/sunrpc/clnt.c | 2 | ||||
| -rw-r--r-- | net/sunrpc/sched.c | 4 | ||||
| -rw-r--r-- | net/sunrpc/xprt.c | 4 |
4 files changed, 14 insertions, 16 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index e38f4af20950..6418cb6c079b 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
| @@ -1256,10 +1256,20 @@ static struct nfs4_opendata *nfs4_opendata_alloc(struct dentry *dentry, | |||
| 1256 | atomic_inc(&sp->so_count); | 1256 | atomic_inc(&sp->so_count); |
| 1257 | p->o_arg.open_flags = flags; | 1257 | p->o_arg.open_flags = flags; |
| 1258 | p->o_arg.fmode = fmode & (FMODE_READ|FMODE_WRITE); | 1258 | p->o_arg.fmode = fmode & (FMODE_READ|FMODE_WRITE); |
| 1259 | p->o_arg.umask = current_umask(); | ||
| 1260 | p->o_arg.claim = nfs4_map_atomic_open_claim(server, claim); | 1259 | p->o_arg.claim = nfs4_map_atomic_open_claim(server, claim); |
| 1261 | p->o_arg.share_access = nfs4_map_atomic_open_share(server, | 1260 | p->o_arg.share_access = nfs4_map_atomic_open_share(server, |
| 1262 | fmode, flags); | 1261 | fmode, flags); |
| 1262 | if (flags & O_CREAT) { | ||
| 1263 | p->o_arg.umask = current_umask(); | ||
| 1264 | p->o_arg.label = nfs4_label_copy(p->a_label, label); | ||
| 1265 | if (c->sattr != NULL && c->sattr->ia_valid != 0) { | ||
| 1266 | p->o_arg.u.attrs = &p->attrs; | ||
| 1267 | memcpy(&p->attrs, c->sattr, sizeof(p->attrs)); | ||
| 1268 | |||
| 1269 | memcpy(p->o_arg.u.verifier.data, c->verf, | ||
| 1270 | sizeof(p->o_arg.u.verifier.data)); | ||
| 1271 | } | ||
| 1272 | } | ||
| 1263 | /* don't put an ACCESS op in OPEN compound if O_EXCL, because ACCESS | 1273 | /* don't put an ACCESS op in OPEN compound if O_EXCL, because ACCESS |
| 1264 | * will return permission denied for all bits until close */ | 1274 | * will return permission denied for all bits until close */ |
| 1265 | if (!(flags & O_EXCL)) { | 1275 | if (!(flags & O_EXCL)) { |
| @@ -1283,7 +1293,6 @@ static struct nfs4_opendata *nfs4_opendata_alloc(struct dentry *dentry, | |||
| 1283 | p->o_arg.server = server; | 1293 | p->o_arg.server = server; |
| 1284 | p->o_arg.bitmask = nfs4_bitmask(server, label); | 1294 | p->o_arg.bitmask = nfs4_bitmask(server, label); |
| 1285 | p->o_arg.open_bitmap = &nfs4_fattr_bitmap[0]; | 1295 | p->o_arg.open_bitmap = &nfs4_fattr_bitmap[0]; |
| 1286 | p->o_arg.label = nfs4_label_copy(p->a_label, label); | ||
| 1287 | switch (p->o_arg.claim) { | 1296 | switch (p->o_arg.claim) { |
| 1288 | case NFS4_OPEN_CLAIM_NULL: | 1297 | case NFS4_OPEN_CLAIM_NULL: |
| 1289 | case NFS4_OPEN_CLAIM_DELEGATE_CUR: | 1298 | case NFS4_OPEN_CLAIM_DELEGATE_CUR: |
| @@ -1296,13 +1305,6 @@ static struct nfs4_opendata *nfs4_opendata_alloc(struct dentry *dentry, | |||
| 1296 | case NFS4_OPEN_CLAIM_DELEG_PREV_FH: | 1305 | case NFS4_OPEN_CLAIM_DELEG_PREV_FH: |
| 1297 | p->o_arg.fh = NFS_FH(d_inode(dentry)); | 1306 | p->o_arg.fh = NFS_FH(d_inode(dentry)); |
| 1298 | } | 1307 | } |
| 1299 | if (c != NULL && c->sattr != NULL && c->sattr->ia_valid != 0) { | ||
| 1300 | p->o_arg.u.attrs = &p->attrs; | ||
| 1301 | memcpy(&p->attrs, c->sattr, sizeof(p->attrs)); | ||
| 1302 | |||
| 1303 | memcpy(p->o_arg.u.verifier.data, c->verf, | ||
| 1304 | sizeof(p->o_arg.u.verifier.data)); | ||
| 1305 | } | ||
| 1306 | p->c_arg.fh = &p->o_res.fh; | 1308 | p->c_arg.fh = &p->o_res.fh; |
| 1307 | p->c_arg.stateid = &p->o_res.stateid; | 1309 | p->c_arg.stateid = &p->o_res.stateid; |
| 1308 | p->c_arg.seqid = p->o_arg.seqid; | 1310 | p->c_arg.seqid = p->o_arg.seqid; |
diff --git a/net/sunrpc/clnt.c b/net/sunrpc/clnt.c index 627a87a71f8b..b03bfa055c08 100644 --- a/net/sunrpc/clnt.c +++ b/net/sunrpc/clnt.c | |||
| @@ -634,7 +634,6 @@ static struct rpc_clnt *__rpc_clone_client(struct rpc_create_args *args, | |||
| 634 | new->cl_discrtry = clnt->cl_discrtry; | 634 | new->cl_discrtry = clnt->cl_discrtry; |
| 635 | new->cl_chatty = clnt->cl_chatty; | 635 | new->cl_chatty = clnt->cl_chatty; |
| 636 | new->cl_principal = clnt->cl_principal; | 636 | new->cl_principal = clnt->cl_principal; |
| 637 | new->cl_cred = get_cred(clnt->cl_cred); | ||
| 638 | return new; | 637 | return new; |
| 639 | 638 | ||
| 640 | out_err: | 639 | out_err: |
| @@ -2805,6 +2804,7 @@ int rpc_clnt_add_xprt(struct rpc_clnt *clnt, | |||
| 2805 | xprt = xprt_iter_xprt(&clnt->cl_xpi); | 2804 | xprt = xprt_iter_xprt(&clnt->cl_xpi); |
| 2806 | if (xps == NULL || xprt == NULL) { | 2805 | if (xps == NULL || xprt == NULL) { |
| 2807 | rcu_read_unlock(); | 2806 | rcu_read_unlock(); |
| 2807 | xprt_switch_put(xps); | ||
| 2808 | return -EAGAIN; | 2808 | return -EAGAIN; |
| 2809 | } | 2809 | } |
| 2810 | resvport = xprt->resvport; | 2810 | resvport = xprt->resvport; |
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index bb04ae52803a..a2c114812717 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
| @@ -250,9 +250,7 @@ static void __rpc_init_priority_wait_queue(struct rpc_wait_queue *queue, const c | |||
| 250 | queue->maxpriority = nr_queues - 1; | 250 | queue->maxpriority = nr_queues - 1; |
| 251 | rpc_reset_waitqueue_priority(queue); | 251 | rpc_reset_waitqueue_priority(queue); |
| 252 | queue->qlen = 0; | 252 | queue->qlen = 0; |
| 253 | timer_setup(&queue->timer_list.timer, | 253 | timer_setup(&queue->timer_list.timer, __rpc_queue_timer_fn, 0); |
| 254 | __rpc_queue_timer_fn, | ||
| 255 | TIMER_DEFERRABLE); | ||
| 256 | INIT_LIST_HEAD(&queue->timer_list.list); | 254 | INIT_LIST_HEAD(&queue->timer_list.list); |
| 257 | rpc_assign_waitqueue_name(queue, qname); | 255 | rpc_assign_waitqueue_name(queue, qname); |
| 258 | } | 256 | } |
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index ad21880d5601..f6c82b1651e7 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c | |||
| @@ -1876,9 +1876,7 @@ found: | |||
| 1876 | xprt->idle_timeout = 0; | 1876 | xprt->idle_timeout = 0; |
| 1877 | INIT_WORK(&xprt->task_cleanup, xprt_autoclose); | 1877 | INIT_WORK(&xprt->task_cleanup, xprt_autoclose); |
| 1878 | if (xprt_has_timer(xprt)) | 1878 | if (xprt_has_timer(xprt)) |
| 1879 | timer_setup(&xprt->timer, | 1879 | timer_setup(&xprt->timer, xprt_init_autodisconnect, 0); |
| 1880 | xprt_init_autodisconnect, | ||
| 1881 | TIMER_DEFERRABLE); | ||
| 1882 | else | 1880 | else |
| 1883 | timer_setup(&xprt->timer, NULL, 0); | 1881 | timer_setup(&xprt->timer, NULL, 0); |
| 1884 | 1882 | ||
