diff options
author | Bryan Schumaker <bjschuma@netapp.com> | 2012-03-12 11:28:24 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2012-03-12 12:51:40 -0400 |
commit | 4b7c8dd205d6df1629ccde9f6dcf6a85d34c37ff (patch) | |
tree | 33088a369217ec62afa9068233d33e0913c1b0ee /fs/nfs/client.c | |
parent | 09acfea5d8de419ebe84be43b08f7b79c965215f (diff) |
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>
Diffstat (limited to 'fs/nfs/client.c')
-rw-r--r-- | fs/nfs/client.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/nfs/client.c b/fs/nfs/client.c index f1f047c376d9..2f378487ccde 100644 --- a/fs/nfs/client.c +++ b/fs/nfs/client.c | |||
@@ -404,6 +404,7 @@ static int nfs_sockaddr_cmp_ip4(const struct sockaddr *sa1, | |||
404 | (sin1->sin_port == sin2->sin_port); | 404 | (sin1->sin_port == sin2->sin_port); |
405 | } | 405 | } |
406 | 406 | ||
407 | #if defined(CONFIG_NFS_V4_1) | ||
407 | /* | 408 | /* |
408 | * Test if two socket addresses represent the same actual socket, | 409 | * Test if two socket addresses represent the same actual socket, |
409 | * by comparing (only) relevant fields, excluding the port number. | 410 | * by comparing (only) relevant fields, excluding the port number. |
@@ -422,6 +423,7 @@ static int nfs_sockaddr_match_ipaddr(const struct sockaddr *sa1, | |||
422 | } | 423 | } |
423 | return 0; | 424 | return 0; |
424 | } | 425 | } |
426 | #endif /* CONFIG_NFS_V4_1 */ | ||
425 | 427 | ||
426 | /* | 428 | /* |
427 | * Test if two socket addresses represent the same actual socket, | 429 | * Test if two socket addresses represent the same actual socket, |
@@ -442,6 +444,7 @@ static int nfs_sockaddr_cmp(const struct sockaddr *sa1, | |||
442 | return 0; | 444 | return 0; |
443 | } | 445 | } |
444 | 446 | ||
447 | #if defined(CONFIG_NFS_V4_1) | ||
445 | /* Common match routine for v4.0 and v4.1 callback services */ | 448 | /* Common match routine for v4.0 and v4.1 callback services */ |
446 | static bool nfs4_cb_match_client(const struct sockaddr *addr, | 449 | static bool nfs4_cb_match_client(const struct sockaddr *addr, |
447 | struct nfs_client *clp, u32 minorversion) | 450 | struct nfs_client *clp, u32 minorversion) |
@@ -464,6 +467,7 @@ static bool nfs4_cb_match_client(const struct sockaddr *addr, | |||
464 | 467 | ||
465 | return true; | 468 | return true; |
466 | } | 469 | } |
470 | #endif /* CONFIG_NFS_V4_1 */ | ||
467 | 471 | ||
468 | /* | 472 | /* |
469 | * Find an nfs_client on the list that matches the initialisation data | 473 | * Find an nfs_client on the list that matches the initialisation data |