Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'nfs-for-5.2-3' of git://git.linux-nfs.org/projects/anna/linux-nfs

Pull more NFS client fixes from Anna Schumaker:
"These are mostly refcounting issues that people have found recently.
The revert fixes a suspend recovery performance issue.

- SUNRPC: Fix a credential refcount leak

- Revert "SUNRPC: Declare RPC timers as TIMER_DEFERRABLE"

- SUNRPC: Fix xps refcount imbalance on the error path

- NFS4: Only set creation opendata if O_CREAT"

* tag 'nfs-for-5.2-3' of git://git.linux-nfs.org/projects/anna/linux-nfs:
SUNRPC: Fix a credential refcount leak
Revert "SUNRPC: Declare RPC timers as TIMER_DEFERRABLE"
net :sunrpc :clnt :Fix xps refcount imbalance on the error path
NFS4: Only set creation opendata if O_CREAT

+14 -16
+11 -9
fs/nfs/nfs4proc.c
··· 1256 1256 atomic_inc(&sp->so_count); 1257 1257 p->o_arg.open_flags = flags; 1258 1258 p->o_arg.fmode = fmode & (FMODE_READ|FMODE_WRITE); 1259 - p->o_arg.umask = current_umask(); 1260 1259 p->o_arg.claim = nfs4_map_atomic_open_claim(server, claim); 1261 1260 p->o_arg.share_access = nfs4_map_atomic_open_share(server, 1262 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 1273 /* don't put an ACCESS op in OPEN compound if O_EXCL, because ACCESS 1264 1274 * will return permission denied for all bits until close */ 1265 1275 if (!(flags & O_EXCL)) { ··· 1293 1283 p->o_arg.server = server; 1294 1284 p->o_arg.bitmask = nfs4_bitmask(server, label); 1295 1285 p->o_arg.open_bitmap = &nfs4_fattr_bitmap[0]; 1296 - p->o_arg.label = nfs4_label_copy(p->a_label, label); 1297 1286 switch (p->o_arg.claim) { 1298 1287 case NFS4_OPEN_CLAIM_NULL: 1299 1288 case NFS4_OPEN_CLAIM_DELEGATE_CUR: ··· 1304 1295 case NFS4_OPEN_CLAIM_DELEG_CUR_FH: 1305 1296 case NFS4_OPEN_CLAIM_DELEG_PREV_FH: 1306 1297 p->o_arg.fh = NFS_FH(d_inode(dentry)); 1307 - } 1308 - if (c != NULL && c->sattr != NULL && c->sattr->ia_valid != 0) { 1309 - p->o_arg.u.attrs = &p->attrs; 1310 - memcpy(&p->attrs, c->sattr, sizeof(p->attrs)); 1311 - 1312 - memcpy(p->o_arg.u.verifier.data, c->verf, 1313 - sizeof(p->o_arg.u.verifier.data)); 1314 1298 } 1315 1299 p->c_arg.fh = &p->o_res.fh; 1316 1300 p->c_arg.stateid = &p->o_res.stateid;
+1 -1
net/sunrpc/clnt.c
··· 634 634 new->cl_discrtry = clnt->cl_discrtry; 635 635 new->cl_chatty = clnt->cl_chatty; 636 636 new->cl_principal = clnt->cl_principal; 637 - new->cl_cred = get_cred(clnt->cl_cred); 638 637 return new; 639 638 640 639 out_err: ··· 2804 2805 xprt = xprt_iter_xprt(&clnt->cl_xpi); 2805 2806 if (xps == NULL || xprt == NULL) { 2806 2807 rcu_read_unlock(); 2808 + xprt_switch_put(xps); 2807 2809 return -EAGAIN; 2808 2810 } 2809 2811 resvport = xprt->resvport;
+1 -3
net/sunrpc/sched.c
··· 250 250 queue->maxpriority = nr_queues - 1; 251 251 rpc_reset_waitqueue_priority(queue); 252 252 queue->qlen = 0; 253 - timer_setup(&queue->timer_list.timer, 254 - __rpc_queue_timer_fn, 255 - TIMER_DEFERRABLE); 253 + timer_setup(&queue->timer_list.timer, __rpc_queue_timer_fn, 0); 256 254 INIT_LIST_HEAD(&queue->timer_list.list); 257 255 rpc_assign_waitqueue_name(queue, qname); 258 256 }
+1 -3
net/sunrpc/xprt.c
··· 1876 1876 xprt->idle_timeout = 0; 1877 1877 INIT_WORK(&xprt->task_cleanup, xprt_autoclose); 1878 1878 if (xprt_has_timer(xprt)) 1879 - timer_setup(&xprt->timer, 1880 - xprt_init_autodisconnect, 1881 - TIMER_DEFERRABLE); 1879 + timer_setup(&xprt->timer, xprt_init_autodisconnect, 0); 1882 1880 else 1883 1881 timer_setup(&xprt->timer, NULL, 0); 1884 1882