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

NFS: Only define some function when v4.1 is enabled

Now that the nfs4_cb_match_client() function is static, gcc notices that
it is only used when CONFIG_NFS_V4_1 is enabled.

Signed-off-by: Bryan Schumaker <bjschuma@netapp.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>

authored by

Bryan Schumaker and committed by
Trond Myklebust
4b7c8dd2 09acfea5

+4
+4
fs/nfs/client.c
··· 404 404 (sin1->sin_port == sin2->sin_port); 405 405 } 406 406 407 + #if defined(CONFIG_NFS_V4_1) 407 408 /* 408 409 * Test if two socket addresses represent the same actual socket, 409 410 * by comparing (only) relevant fields, excluding the port number. ··· 423 422 } 424 423 return 0; 425 424 } 425 + #endif /* CONFIG_NFS_V4_1 */ 426 426 427 427 /* 428 428 * Test if two socket addresses represent the same actual socket, ··· 444 442 return 0; 445 443 } 446 444 445 + #if defined(CONFIG_NFS_V4_1) 447 446 /* Common match routine for v4.0 and v4.1 callback services */ 448 447 static bool nfs4_cb_match_client(const struct sockaddr *addr, 449 448 struct nfs_client *clp, u32 minorversion) ··· 467 464 468 465 return true; 469 466 } 467 + #endif /* CONFIG_NFS_V4_1 */ 470 468 471 469 /* 472 470 * Find an nfs_client on the list that matches the initialisation data