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-4.16-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs

Pull NFS client bugfixes from Trond Myklebust:

- fix a broken cast in nfs4_callback_recallany()

- fix an Oops during NFSv4 migration events

- make struct nlmclnt_fl_close_lock_ops static

* tag 'nfs-for-4.16-3' of git://git.linux-nfs.org/projects/trondmy/linux-nfs:
NFS: make struct nlmclnt_fl_close_lock_ops static
nfs: system crashes after NFS4ERR_MOVED recovery
NFSv4: Fix broken cast in nfs4_callback_recallany()

+11 -11
+6 -8
fs/nfs/callback_proc.c
··· 572 572 } 573 573 574 574 static bool 575 - validate_bitmap_values(unsigned long mask) 575 + validate_bitmap_values(unsigned int mask) 576 576 { 577 577 return (mask & ~RCA4_TYPE_MASK_ALL) == 0; 578 578 } ··· 596 596 goto out; 597 597 598 598 status = cpu_to_be32(NFS4_OK); 599 - if (test_bit(RCA4_TYPE_MASK_RDATA_DLG, (const unsigned long *) 600 - &args->craa_type_mask)) 599 + if (args->craa_type_mask & BIT(RCA4_TYPE_MASK_RDATA_DLG)) 601 600 flags = FMODE_READ; 602 - if (test_bit(RCA4_TYPE_MASK_WDATA_DLG, (const unsigned long *) 603 - &args->craa_type_mask)) 601 + if (args->craa_type_mask & BIT(RCA4_TYPE_MASK_WDATA_DLG)) 604 602 flags |= FMODE_WRITE; 605 - if (test_bit(RCA4_TYPE_MASK_FILE_LAYOUT, (const unsigned long *) 606 - &args->craa_type_mask)) 607 - pnfs_recall_all_layouts(cps->clp); 608 603 if (flags) 609 604 nfs_expire_unused_delegation_types(cps->clp, flags); 605 + 606 + if (args->craa_type_mask & BIT(RCA4_TYPE_MASK_FILE_LAYOUT)) 607 + pnfs_recall_all_layouts(cps->clp); 610 608 out: 611 609 dprintk("%s: exit with status = %d\n", __func__, ntohl(status)); 612 610 return status;
+1 -1
fs/nfs/nfs3proc.c
··· 873 873 } 874 874 } 875 875 876 - const struct nlmclnt_operations nlmclnt_fl_close_lock_ops = { 876 + static const struct nlmclnt_operations nlmclnt_fl_close_lock_ops = { 877 877 .nlmclnt_alloc_call = nfs3_nlm_alloc_call, 878 878 .nlmclnt_unlock_prepare = nfs3_nlm_unlock_prepare, 879 879 .nlmclnt_release_call = nfs3_nlm_release_call,
+4 -2
fs/nfs/nfs4client.c
··· 868 868 if (IS_ERR(clp)) 869 869 return PTR_ERR(clp); 870 870 871 - if (server->nfs_client == clp) 871 + if (server->nfs_client == clp) { 872 + nfs_put_client(clp); 872 873 return -ELOOP; 874 + } 873 875 874 876 /* 875 877 * Query for the lease time on clientid setup or renewal ··· 1246 1244 clp->cl_proto, clnt->cl_timeout, 1247 1245 clp->cl_minorversion, net); 1248 1246 clear_bit(NFS_MIG_TSM_POSSIBLE, &server->mig_status); 1249 - nfs_put_client(clp); 1250 1247 if (error != 0) { 1251 1248 nfs_server_insert_lists(server); 1252 1249 return error; 1253 1250 } 1251 + nfs_put_client(clp); 1254 1252 1255 1253 if (server->nfs_client->cl_hostname == NULL) 1256 1254 server->nfs_client->cl_hostname = kstrdup(hostname, GFP_KERNEL);