diff options
-rw-r--r-- | fs/nfs/nfs4client.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/fs/nfs/nfs4client.c b/fs/nfs/nfs4client.c index 03311259b0c4..d949d0f378ec 100644 --- a/fs/nfs/nfs4client.c +++ b/fs/nfs/nfs4client.c | |||
@@ -566,20 +566,14 @@ static bool nfs4_match_clientids(struct nfs_client *a, struct nfs_client *b) | |||
566 | } | 566 | } |
567 | 567 | ||
568 | /* | 568 | /* |
569 | * Returns true if the server owners match | 569 | * Returns true if the server major ids match |
570 | */ | 570 | */ |
571 | static bool | 571 | static bool |
572 | nfs4_match_serverowners(struct nfs_client *a, struct nfs_client *b) | 572 | nfs4_check_clientid_trunking(struct nfs_client *a, struct nfs_client *b) |
573 | { | 573 | { |
574 | struct nfs41_server_owner *o1 = a->cl_serverowner; | 574 | struct nfs41_server_owner *o1 = a->cl_serverowner; |
575 | struct nfs41_server_owner *o2 = b->cl_serverowner; | 575 | struct nfs41_server_owner *o2 = b->cl_serverowner; |
576 | 576 | ||
577 | if (o1->minor_id != o2->minor_id) { | ||
578 | dprintk("NFS: --> %s server owner minor IDs do not match\n", | ||
579 | __func__); | ||
580 | return false; | ||
581 | } | ||
582 | |||
583 | if (o1->major_id_sz != o2->major_id_sz) | 577 | if (o1->major_id_sz != o2->major_id_sz) |
584 | goto out_major_mismatch; | 578 | goto out_major_mismatch; |
585 | if (memcmp(o1->major_id, o2->major_id, o1->major_id_sz) != 0) | 579 | if (memcmp(o1->major_id, o2->major_id, o1->major_id_sz) != 0) |
@@ -654,7 +648,12 @@ int nfs41_walk_client_list(struct nfs_client *new, | |||
654 | if (!nfs4_match_clientids(pos, new)) | 648 | if (!nfs4_match_clientids(pos, new)) |
655 | continue; | 649 | continue; |
656 | 650 | ||
657 | if (!nfs4_match_serverowners(pos, new)) | 651 | /* |
652 | * Note that session trunking is just a special subcase of | ||
653 | * client id trunking. In either case, we want to fall back | ||
654 | * to using the existing nfs_client. | ||
655 | */ | ||
656 | if (!nfs4_check_clientid_trunking(pos, new)) | ||
658 | continue; | 657 | continue; |
659 | 658 | ||
660 | atomic_inc(&pos->cl_count); | 659 | atomic_inc(&pos->cl_count); |