* Two compiler warning fix-ups
@ 2013-09-04 15:51 Chuck Lever
0 siblings, 0 replies; only message in thread
From: Chuck Lever @ 2013-09-04 15:51 UTC (permalink / raw)
To: Trond Myklebust; +Cc: linux-nfs
[-- Attachment #1: Type: text/plain, Size: 153 bytes --]
Sorry for the attachments. "git mail" is not yet working from my test machine inside the Oracle firewall.
--
Chuck Lever
chuck.lever@oracle.com
[-- Attachment #2: nfs-fix-sparse-warning --]
[-- Type: application/octet-stream, Size: 2457 bytes --]
NFS: Fix sparse warning introduced by NFSv4.0 transport blocking patches
From: Chuck Lever <chuck.lever@oracle.com>
When CONFIG_NFS_V4_1 is not enabled, "make C=2" emits this warning:
linux/fs/nfs/nfs4session.c:337:6: warning:
symbol 'nfs41_set_target_slotid' was not declared. Should it be static?
Move nfs41_set_target_slotid() and nfs41_update_target_slotid() back
behind CONFIG_NFS_V4_1, since, in the final revision of this work,
they are used only in NFSv4.1 and later.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
fs/nfs/nfs4session.c | 4 ++--
fs/nfs/nfs4session.h | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/nfs/nfs4session.c b/fs/nfs/nfs4session.c
index e0bf666..cf883c7 100644
--- a/fs/nfs/nfs4session.c
+++ b/fs/nfs/nfs4session.c
@@ -310,6 +310,8 @@ void nfs41_wake_slot_table(struct nfs4_slot_table *tbl)
}
}
+#if defined(CONFIG_NFS_V4_1)
+
static void nfs41_set_max_slotid_locked(struct nfs4_slot_table *tbl,
u32 target_highest_slotid)
{
@@ -420,8 +422,6 @@ void nfs41_update_target_slotid(struct nfs4_slot_table *tbl,
spin_unlock(&tbl->slot_tbl_lock);
}
-#if defined(CONFIG_NFS_V4_1)
-
static void nfs4_destroy_session_slot_tables(struct nfs4_session *session)
{
nfs4_release_slot_table(&session->fc_slot_table);
diff --git a/fs/nfs/nfs4session.h b/fs/nfs/nfs4session.h
index 92c27f4..a2f808c 100644
--- a/fs/nfs/nfs4session.h
+++ b/fs/nfs/nfs4session.h
@@ -78,9 +78,6 @@ extern void nfs4_release_slot_table(struct nfs4_slot_table *tbl);
extern struct nfs4_slot *nfs4_alloc_slot(struct nfs4_slot_table *tbl);
extern void nfs4_free_slot(struct nfs4_slot_table *tbl, struct nfs4_slot *slot);
extern void nfs4_slot_tbl_drain_complete(struct nfs4_slot_table *tbl);
-extern void nfs41_update_target_slotid(struct nfs4_slot_table *tbl,
- struct nfs4_slot *slot,
- struct nfs4_sequence_res *res);
bool nfs41_wake_and_assign_slot(struct nfs4_slot_table *tbl,
struct nfs4_slot *slot);
void nfs41_wake_slot_table(struct nfs4_slot_table *tbl);
@@ -93,6 +90,9 @@ static inline bool nfs4_slot_tbl_draining(struct nfs4_slot_table *tbl)
#if defined(CONFIG_NFS_V4_1)
extern void nfs41_set_target_slotid(struct nfs4_slot_table *tbl,
u32 target_highest_slotid);
+extern void nfs41_update_target_slotid(struct nfs4_slot_table *tbl,
+ struct nfs4_slot *slot,
+ struct nfs4_sequence_res *res);
extern int nfs4_setup_session_slot_tables(struct nfs4_session *ses);
[-- Attachment #3: nfs-fix-other-sparse-warning --]
[-- Type: application/octet-stream, Size: 1330 bytes --]
NFS: Fix warning introduced by NFSv4.0 transport blocking patches
From: Chuck Lever <chuck.lever@oracle.com>
When CONFIG_NFS_V4_1 is not enabled, gcc emits this warning:
linux/fs/nfs/nfs4state.c:255:12: warning:
‘nfs4_begin_drain_session’ defined but not used [-Wunused-function]
static int nfs4_begin_drain_session(struct nfs_client *clp)
^
Eventually NFSv4.0 migration recovery will invoke this function, but
that has not yet been merged. Hide nfs4_begin_drain_session()
behind CONFIG_NFS_V4_1 for now.
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
fs/nfs/nfs4state.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
index d816d93..4921dc3 100644
--- a/fs/nfs/nfs4state.c
+++ b/fs/nfs/nfs4state.c
@@ -239,6 +239,8 @@ static void nfs4_end_drain_session(struct nfs_client *clp)
}
}
+#if defined(CONFIG_NFS_V4_1)
+
static int nfs4_drain_slot_tbl(struct nfs4_slot_table *tbl)
{
set_bit(NFS4_SLOT_TBL_DRAINING, &tbl->slot_tbl_state);
@@ -268,8 +270,6 @@ static int nfs4_begin_drain_session(struct nfs_client *clp)
return nfs4_drain_slot_tbl(&ses->fc_slot_table);
}
-#if defined(CONFIG_NFS_V4_1)
-
static int nfs41_setup_state_renewal(struct nfs_client *clp)
{
int status;
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2013-09-04 15:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-04 15:51 Two compiler warning fix-ups Chuck Lever
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.