: Fix compilation warnings in fs/nfsd/nfs4state.c
Subsystems (3)
PATCH 1/1 : Fix compilation warnings in fs/nfsd/nfs4state.c
Below patch removes the following warning ;- fs/nfsd/nfs4state.c:1657: warning: unused variable 'flp'
--- fs/nfsd/nfs4state.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)
fs/nfsd/nfs4state.c +0 -0
@@ -1654,7 +1654,10 @@ nfs4_open_delegation(struct svc_fh *fh, struct
nfsd4_open *open, struct nfs4_sta
struct nfs4_delegation *dp;
struct nfs4_stateowner *sop = stp->st_stateowner; struct nfs4_callback *cb = &sop->so_client->cl_callback;
- struct file_lock fl, *flp = &fl;
+ struct file_lock fl;
+#ifdef CONFIG_FILE_LOCKING
+ struct file_lock *flp = &fl;
+#endif
int status, flag = 0;
flag = NFS4_OPEN_DELEGATE_NONE;
Signature · 5 lines
1.5.4.3 Thanks - Manish
A message that is not in the archive (sent off-list or not yet received): ea11fea30901272238t4d11ba15t8bac4cd702ea7440-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org
Quoted 2 lines · Manish Katiyar
Below patch removes the following warning ;-
fs/nfsd/nfs4state.c:1657: warning: unused variable 'flp'
I don't believe we want to support a .config with NFS or NFSD turned on but CONFIG_FILE_LOCKING off.
--b.
Quoted 34 lines
Signed-off-by Manish Katiyar <[email protected]>--- fs/nfsd/nfs4state.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-)fs/nfsd/nfs4state.c +0
-0@@ -1654,7 +1654,10 @@ nfs4_open_delegation(struct svc_fh *fh, struct
nfsd4_open*open, structnfs4_stafs/nfsd/nfs4state.c +4
-1struct nfs4_delegation *dp;struct nfs4_stateowner *sop = stp->st_stateowner;struct nfs4_callback *cb = &sop->so_client->cl_callback; -struct file_lock fl, *flp = &fl; +struct file_lock fl; +#ifdef CONFIG_FILE_LOCKING +struct file_lock *flp = &fl; +#endif int status, flag =0 ; flag =NFS4_OPEN_DELEGATE_NONE ;Signature · 9 lines
1.5.4.3 Thanks - Manish -- To unsubscribe from this list: send the line "unsubscribe linux-nfs" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 6 lines · J. Bruce Fields
Quoted 2 lines · Manish Katiyar
Below patch removes the following warning ;-
fs/nfsd/nfs4state.c:1657: warning: unused variable 'flp'I don't believe we want to support a .config with NFS or NFSD turned on but
CONFIG_FILE_LOCKINGoff.
In that case, would we want to add a "depends on FILE_LOCKING" to both CONFIG_NFS and CONFIG_NFSD?
Quoted 23 lines
--b.
Quoted 21 lines
Signed-off-by Manish Katiyar <[email protected]>---
fs/nfsd/nfs4state.c| 5 ++++-1 files changed, 4 insertions(+), 1 deletions(-)fs/nfsd/nfs4state.c +0
-0@@ -1654,7 +1654,10 @@ nfs4_open_delegation(struct svc_fh *fh, struct
nfsd4_open*open, structnfs4_stastruct nfs4_delegation *dp; struct nfs4_stateowner *sop = stp->st_stateowner; struct nfs4_callback *cb = &sop->so_client->cl_callback;fs/nfsd/nfs4state.c +4
-1-struct file_lock fl, *flp = &fl; +struct file_lock fl; +#ifdef CONFIG_FILE_LOCKING +struct file_lock *flp = &fl; +#endif int status, flag = 0;
Quoted 1 line
Quoted 1 line
flag = NFS4_OPEN_DELEGATE_NONE;
--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com
Quoted 11 lines · Chuck Lever
Quoted 7 lines · J. Bruce Fields
Quoted 2 lines · Manish Katiyar
Below patch removes the following warning ;-
fs/nfsd/nfs4state.c:1657: warning: unused variable 'flp'I don't believe we want to support a .config with NFS or NFSD turned on
butCONFIG_FILE_LOCKINGoff.In that case, would we want to add a "depends on
FILE_LOCKING" to bothCONFIG_NFSandCONFIG_NFSD?
Could be.
--b.
Quoted 29 lines
Quoted 24 lines
--b.
Quoted 21 lines
Signed-off-by Manish Katiyar <[email protected]>---
fs/nfsd/nfs4state.c| 5 ++++-1 files changed, 4 insertions(+), 1 deletions(-)fs/nfsd/nfs4state.c +0
-0@@ -1654,7 +1654,10 @@ nfs4_open_delegation(struct svc_fh *fh, struct
nfsd4_open*open, structnfs4_stastruct nfs4_delegation *dp; struct nfs4_stateowner *sop = stp->st_stateowner; struct nfs4_callback *cb = &sop->so_client->cl_callback;fs/nfsd/nfs4state.c +4
-1-struct file_lock fl, *flp = &fl; +struct file_lock fl; +#ifdef CONFIG_FILE_LOCKING +struct file_lock *flp = &fl; +#endif int status, flag = 0;Quoted 1 line
Quoted 1 line
flag = NFS4_OPEN_DELEGATE_NONE;--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com
Quoted 6 lines · J. Bruce Fields
Quoted 5 lines · Chuck Lever
Quoted 4 lines · J. Bruce Fields
Quoted 2 lines · Manish Katiyar
Below patch removes the following warning ;-
fs/nfsd/nfs4state.c:1657: warning: unused variable 'flp'
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
I don't believe we want to support a .config with NFS or NFSD turned on
butCONFIG_FILE_LOCKINGoff.In that case, would we want to add a "depends on
FILE_LOCKING" to bothCONFIG_NFSandCONFIG_NFSD?Could be.
Yes...that would be a better option. I will rework the changes and send an updated patch.
Thanks -
Manish
Quoted 33 lines
--b.
Quoted 29 lines
Quoted 24 lines
--b.
Quoted 21 lines
Signed-off-by Manish Katiyar <[email protected]>---
fs/nfsd/nfs4state.c| 5 ++++-1 files changed, 4 insertions(+), 1 deletions(-)fs/nfsd/nfs4state.c +0
-0@@ -1654,7 +1654,10 @@ nfs4_open_delegation(struct svc_fh *fh, struct
nfsd4_open*open, structnfs4_stastruct nfs4_delegation *dp; struct nfs4_stateowner *sop = stp->st_stateowner; struct nfs4_callback *cb = &sop->so_client->cl_callback;fs/nfsd/nfs4state.c +4
-1-struct file_lock fl, *flp = &fl; +struct file_lock fl; +#ifdef CONFIG_FILE_LOCKING +struct file_lock *flp = &fl; +#endif int status, flag =0 ;Quoted 1 line
Quoted 1 line
flag = NFS4_OPEN_DELEGATE_NONE;--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com
Quoted 6 lines · J. Bruce Fields
Quoted 5 lines · Chuck Lever
Quoted 4 lines · J. Bruce Fields
Quoted 2 lines · Manish Katiyar
Below patch removes the following warning ;-
fs/nfsd/nfs4state.c:1657: warning: unused variable 'flp'
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
I don't believe we want to support a .config with NFS or NFSD turned on
butCONFIG_FILE_LOCKINGoff.In that case, would we want to add a "depends on
FILE_LOCKING" to bothCONFIG_NFSandCONFIG_NFSD?Could be.
Enable NFS_FS and NFSD only when FILE_LOCKING is enabled.
--- fs/Kconfig | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
fs/Kconfig +2 -0
@@ -1205,6 +1205,7 @@ if NETWORK_FILESYSTEMS config NFS_FS tristate "NFS client support" depends on INET + depends on FILE_LOCKING select LOCKD select SUNRPC select NFS_ACL_SUPPORT if NFS_V3_ACL
@@ -1301,6 +1302,7 @@ config NFS_FSCACHE config NFSD tristate "NFS server support" depends on INET + depends on FILE_LOCKING select LOCKD select SUNRPC select EXPORTFS
Signature · 5 lines
1.5.4.3 Thanks - Manish
Quoted 33 lines
--b.
Quoted 29 lines
Quoted 24 lines
--b.
Quoted 21 lines
Signed-off-by Manish Katiyar <[email protected]>---
fs/nfsd/nfs4state.c| 5 ++++-1 files changed, 4 insertions(+), 1 deletions(-)fs/nfsd/nfs4state.c +0
-0@@ -1654,7 +1654,10 @@ nfs4_open_delegation(struct svc_fh *fh, struct
nfsd4_open*open, structnfs4_stastruct nfs4_delegation *dp; struct nfs4_stateowner *sop = stp->st_stateowner; struct nfs4_callback *cb = &sop->so_client->cl_callback;fs/nfsd/nfs4state.c +4
-1-struct file_lock fl, *flp = &fl; +struct file_lock fl; +#ifdef CONFIG_FILE_LOCKING +struct file_lock *flp = &fl; +#endif int status, flag =0 ;Quoted 1 line
Quoted 1 line
flag = NFS4_OPEN_DELEGATE_NONE;--
Chuck Lever
chuck[dot]lever[at]oracle[dot]com