linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] lockd: fix FILE_LOCKING=n build error
       [not found] <20090428165343.2e357d7a.sfr@canb.auug.org.au>
@ 2009-04-28 15:22 ` Randy Dunlap
  2009-04-28 15:38   ` Felix Blyakher
  2009-04-28 17:21   ` J. Bruce Fields
  0 siblings, 2 replies; 7+ messages in thread
From: Randy Dunlap @ 2009-04-28 15:22 UTC (permalink / raw)
  To: Stephen Rothwell
  Cc: linux-next, LKML, Andrew Morton, Matthew Wilcox, linux-fsdevel

From: Randy Dunlap <randy.dunlap@oracle.com>

lockd/svclock.c is missing a header file <linux/fs.h>.

<linux/fs.h> is missing a definition of locks_release_private()
for the config case of FILE_LOCKING=n, causing a build error:

fs/lockd/svclock.c:330: error: implicit declaration of function 'locks_release_private'

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 fs/lockd/svclock.c |    1 +
 include/linux/fs.h |    4 ++++
 2 files changed, 5 insertions(+)

--- linux-next-20090428.orig/fs/lockd/svclock.c
+++ linux-next-20090428/fs/lockd/svclock.c
@@ -22,6 +22,7 @@
 
 #include <linux/types.h>
 #include <linux/errno.h>
+#include <linux/fs.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/smp_lock.h>
--- linux-next-20090428.orig/include/linux/fs.h
+++ linux-next-20090428/include/linux/fs.h
@@ -1183,6 +1183,10 @@ static inline void locks_remove_flock(st
 	return;
 }
 
+static inline void locks_release_private(struct file_lock *fl)
+{
+}
+
 static inline void posix_test_lock(struct file *filp, struct file_lock *fl)
 {
 	return;

-- 
~Randy

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] lockd: fix FILE_LOCKING=n build error
  2009-04-28 15:22 ` [PATCH] lockd: fix FILE_LOCKING=n build error Randy Dunlap
@ 2009-04-28 15:38   ` Felix Blyakher
  2009-04-28 17:21   ` J. Bruce Fields
  1 sibling, 0 replies; 7+ messages in thread
From: Felix Blyakher @ 2009-04-28 15:38 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Stephen Rothwell, linux-next, LKML, Andrew Morton, Matthew Wilcox,
	linux-fsdevel


On Apr 28, 2009, at 10:22 AM, Randy Dunlap wrote:

> From: Randy Dunlap <randy.dunlap@oracle.com>
>
> lockd/svclock.c is missing a header file <linux/fs.h>.
>
> <linux/fs.h> is missing a definition of locks_release_private()
> for the config case of FILE_LOCKING=n, causing a build error:
>
> fs/lockd/svclock.c:330: error: implicit declaration of function  
> 'locks_release_private'
>
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>

Heh, I did miss it in my original patch, where I added
locks_release_private().
The fix looks good, thanks.

Reviewed-by: Felix Blyakher <felixb@sgi.com>

>
> ---
> fs/lockd/svclock.c |    1 +
> include/linux/fs.h |    4 ++++
> 2 files changed, 5 insertions(+)
>
> --- linux-next-20090428.orig/fs/lockd/svclock.c
> +++ linux-next-20090428/fs/lockd/svclock.c
> @@ -22,6 +22,7 @@
>
> #include <linux/types.h>
> #include <linux/errno.h>
> +#include <linux/fs.h>
> #include <linux/kernel.h>
> #include <linux/sched.h>
> #include <linux/smp_lock.h>
> --- linux-next-20090428.orig/include/linux/fs.h
> +++ linux-next-20090428/include/linux/fs.h
> @@ -1183,6 +1183,10 @@ static inline void locks_remove_flock(st
> 	return;
> }
>
> +static inline void locks_release_private(struct file_lock *fl)
> +{
> +}
> +
> static inline void posix_test_lock(struct file *filp, struct  
> file_lock *fl)
> {
> 	return;
>
> -- 
> ~Randy
> --
> To unsubscribe from this list: send the line "unsubscribe linux- 
> fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] lockd: fix FILE_LOCKING=n build error
  2009-04-28 15:22 ` [PATCH] lockd: fix FILE_LOCKING=n build error Randy Dunlap
  2009-04-28 15:38   ` Felix Blyakher
@ 2009-04-28 17:21   ` J. Bruce Fields
  2009-04-28 17:51     ` Randy Dunlap
  1 sibling, 1 reply; 7+ messages in thread
From: J. Bruce Fields @ 2009-04-28 17:21 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Stephen Rothwell, linux-next, LKML, Andrew Morton, Matthew Wilcox,
	linux-fsdevel

On Tue, Apr 28, 2009 at 08:22:50AM -0700, Randy Dunlap wrote:
> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> lockd/svclock.c is missing a header file <linux/fs.h>.
> 
> <linux/fs.h> is missing a definition of locks_release_private()
> for the config case of FILE_LOCKING=n, causing a build error:
> 
> fs/lockd/svclock.c:330: error: implicit declaration of function 'locks_release_private'

LOCKD without FILE_LOCKING doesn't really make sense; would it be better
to add a config dependency?

--b.

> 
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> ---
>  fs/lockd/svclock.c |    1 +
>  include/linux/fs.h |    4 ++++
>  2 files changed, 5 insertions(+)
> 
> --- linux-next-20090428.orig/fs/lockd/svclock.c
> +++ linux-next-20090428/fs/lockd/svclock.c
> @@ -22,6 +22,7 @@
>  
>  #include <linux/types.h>
>  #include <linux/errno.h>
> +#include <linux/fs.h>
>  #include <linux/kernel.h>
>  #include <linux/sched.h>
>  #include <linux/smp_lock.h>
> --- linux-next-20090428.orig/include/linux/fs.h
> +++ linux-next-20090428/include/linux/fs.h
> @@ -1183,6 +1183,10 @@ static inline void locks_remove_flock(st
>  	return;
>  }
>  
> +static inline void locks_release_private(struct file_lock *fl)
> +{
> +}
> +
>  static inline void posix_test_lock(struct file *filp, struct file_lock *fl)
>  {
>  	return;
> 
> -- 
> ~Randy
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] lockd: fix FILE_LOCKING=n build error
  2009-04-28 17:21   ` J. Bruce Fields
@ 2009-04-28 17:51     ` Randy Dunlap
  2009-04-28 18:15       ` Trond Myklebust
  0 siblings, 1 reply; 7+ messages in thread
From: Randy Dunlap @ 2009-04-28 17:51 UTC (permalink / raw)
  To: J. Bruce Fields
  Cc: Stephen Rothwell, linux-next, LKML, Andrew Morton, Matthew Wilcox,
	linux-fsdevel

J. Bruce Fields wrote:
> On Tue, Apr 28, 2009 at 08:22:50AM -0700, Randy Dunlap wrote:
>> From: Randy Dunlap <randy.dunlap@oracle.com>
>>
>> lockd/svclock.c is missing a header file <linux/fs.h>.
>>
>> <linux/fs.h> is missing a definition of locks_release_private()
>> for the config case of FILE_LOCKING=n, causing a build error:
>>
>> fs/lockd/svclock.c:330: error: implicit declaration of function 'locks_release_private'
> 
> LOCKD without FILE_LOCKING doesn't really make sense; would it be better
> to add a config dependency?


I just tried a patch like the one below instead of the first one,
but it has build errors too, so more Makefile/Kconfig work is
needed (by someone who knows what interfaces are needed here):


fs/built-in.o: In function `nfs_start_lockd':
client.c:(.text+0xe8848): undefined reference to `nlmclnt_init'
fs/built-in.o: In function `nfs_destroy_server':
client.c:(.text+0xe8885): undefined reference to `nlmclnt_done'
fs/built-in.o: In function `nfs_proc_lock':
proc.c:(.text+0xf735f): undefined reference to `nlmclnt_proc'
fs/built-in.o: In function `nfs3_proc_lock':
nfs3proc.c:(.text+0xfd1df): undefined reference to `nlmclnt_proc'




lockd without FILE_LOCKING doesn't make sense, so make LOCKD and
LOCKD_V4 depend on FILE_LOCKING.
---
 fs/Kconfig     |    2 ++
 fs/nfs/Kconfig |    2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

--- linux-next-20090428.orig/fs/Kconfig
+++ linux-next-20090428/fs/Kconfig
@@ -226,10 +226,12 @@ source "fs/nfsd/Kconfig"
 
 config LOCKD
 	tristate
+	depends on FILE_LOCKING
 
 config LOCKD_V4
 	bool
 	depends on NFSD_V3 || NFS_V3
+	depends on FILE_LOCKING
 	default y
 
 config EXPORTFS
--- linux-next-20090428.orig/fs/nfs/Kconfig
+++ linux-next-20090428/fs/nfs/Kconfig
@@ -1,7 +1,7 @@
 config NFS_FS
 	tristate "NFS client support"
 	depends on INET
-	select LOCKD
+	select LOCKD if FILE_LOCKING
 	select SUNRPC
 	select NFS_ACL_SUPPORT if NFS_V3_ACL
 	help

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] lockd: fix FILE_LOCKING=n build error
  2009-04-28 17:51     ` Randy Dunlap
@ 2009-04-28 18:15       ` Trond Myklebust
  2009-04-28 21:01         ` [PATCH v2] " Randy Dunlap
  0 siblings, 1 reply; 7+ messages in thread
From: Trond Myklebust @ 2009-04-28 18:15 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: J. Bruce Fields, Stephen Rothwell, linux-next, LKML,
	Andrew Morton, Matthew Wilcox, linux-fsdevel

On Tue, 2009-04-28 at 10:51 -0700, Randy Dunlap wrote:
> J. Bruce Fields wrote:
> > On Tue, Apr 28, 2009 at 08:22:50AM -0700, Randy Dunlap wrote:
> >> From: Randy Dunlap <randy.dunlap@oracle.com>
> >>
> >> lockd/svclock.c is missing a header file <linux/fs.h>.
> >>
> >> <linux/fs.h> is missing a definition of locks_release_private()
> >> for the config case of FILE_LOCKING=n, causing a build error:
> >>
> >> fs/lockd/svclock.c:330: error: implicit declaration of function 'locks_release_private'
> > 
> > LOCKD without FILE_LOCKING doesn't really make sense; would it be better
> > to add a config dependency?
> 
> 
> I just tried a patch like the one below instead of the first one,
> but it has build errors too, so more Makefile/Kconfig work is
> needed (by someone who knows what interfaces are needed here):
> 
> 
> fs/built-in.o: In function `nfs_start_lockd':
> client.c:(.text+0xe8848): undefined reference to `nlmclnt_init'
> fs/built-in.o: In function `nfs_destroy_server':
> client.c:(.text+0xe8885): undefined reference to `nlmclnt_done'
> fs/built-in.o: In function `nfs_proc_lock':
> proc.c:(.text+0xf735f): undefined reference to `nlmclnt_proc'
> fs/built-in.o: In function `nfs3_proc_lock':
> nfs3proc.c:(.text+0xfd1df): undefined reference to `nlmclnt_proc'
> 
> 
> 
> 
> lockd without FILE_LOCKING doesn't make sense, so make LOCKD and
> LOCKD_V4 depend on FILE_LOCKING.
> ---
>  fs/Kconfig     |    2 ++
>  fs/nfs/Kconfig |    2 +-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> --- linux-next-20090428.orig/fs/Kconfig
> +++ linux-next-20090428/fs/Kconfig
> @@ -226,10 +226,12 @@ source "fs/nfsd/Kconfig"
>  
>  config LOCKD
>  	tristate
> +	depends on FILE_LOCKING
>  
>  config LOCKD_V4
>  	bool
>  	depends on NFSD_V3 || NFS_V3
> +	depends on FILE_LOCKING
>  	default y
>  
>  config EXPORTFS
> --- linux-next-20090428.orig/fs/nfs/Kconfig
> +++ linux-next-20090428/fs/nfs/Kconfig
> @@ -1,7 +1,7 @@
>  config NFS_FS
>  	tristate "NFS client support"
>  	depends on INET
> -	select LOCKD
> +	select LOCKD if FILE_LOCKING
>  	select SUNRPC
>  	select NFS_ACL_SUPPORT if NFS_V3_ACL
>  	help

Until someone finds time to go through the code and add in all the
CONFIG_FILE_LOCKING special cases, the above needs to be a 'depends on
INET && FILE_LOCKING'.

Trond

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH v2] lockd: fix FILE_LOCKING=n build error
  2009-04-28 18:15       ` Trond Myklebust
@ 2009-04-28 21:01         ` Randy Dunlap
  2009-04-28 21:40           ` J. Bruce Fields
  0 siblings, 1 reply; 7+ messages in thread
From: Randy Dunlap @ 2009-04-28 21:01 UTC (permalink / raw)
  To: Trond Myklebust
  Cc: J. Bruce Fields, Stephen Rothwell, linux-next, LKML,
	Andrew Morton, Matthew Wilcox, linux-fsdevel

Trond Myklebust wrote:
> Until someone finds time to go through the code and add in all the
> CONFIG_FILE_LOCKING special cases, the above needs to be a 'depends on
> INET && FILE_LOCKING'.

That seems to work.  Thanks.




From: Randy Dunlap <randy.dunlap@oracle.com>

lockd without FILE_LOCKING doesn't make sense, so make LOCKD and
LOCKD_V4 depend on FILE_LOCKING, and make NFS depend on FILE_LOCKING.

Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
---
 fs/Kconfig     |    2 ++
 fs/nfs/Kconfig |    2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

--- linux-next-20090428.orig/fs/Kconfig
+++ linux-next-20090428/fs/Kconfig
@@ -226,10 +226,12 @@ source "fs/nfsd/Kconfig"
 
 config LOCKD
 	tristate
+	depends on FILE_LOCKING
 
 config LOCKD_V4
 	bool
 	depends on NFSD_V3 || NFS_V3
+	depends on FILE_LOCKING
 	default y
 
 config EXPORTFS
--- linux-next-20090428.orig/fs/nfs/Kconfig
+++ linux-next-20090428/fs/nfs/Kconfig
@@ -1,6 +1,6 @@
 config NFS_FS
 	tristate "NFS client support"
-	depends on INET
+	depends on INET && FILE_LOCKING
 	select LOCKD
 	select SUNRPC
 	select NFS_ACL_SUPPORT if NFS_V3_ACL

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH v2] lockd: fix FILE_LOCKING=n build error
  2009-04-28 21:01         ` [PATCH v2] " Randy Dunlap
@ 2009-04-28 21:40           ` J. Bruce Fields
  0 siblings, 0 replies; 7+ messages in thread
From: J. Bruce Fields @ 2009-04-28 21:40 UTC (permalink / raw)
  To: Randy Dunlap
  Cc: Trond Myklebust, Stephen Rothwell, linux-next, LKML,
	Andrew Morton, Matthew Wilcox, linux-fsdevel

On Tue, Apr 28, 2009 at 02:01:00PM -0700, Randy Dunlap wrote:
> Trond Myklebust wrote:
> > Until someone finds time to go through the code and add in all the
> > CONFIG_FILE_LOCKING special cases, the above needs to be a 'depends on
> > INET && FILE_LOCKING'.
> 
> That seems to work.  Thanks.

Looks good to me.--b.

> 
> 
> 
> 
> From: Randy Dunlap <randy.dunlap@oracle.com>
> 
> lockd without FILE_LOCKING doesn't make sense, so make LOCKD and
> LOCKD_V4 depend on FILE_LOCKING, and make NFS depend on FILE_LOCKING.
> 
> Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com>
> ---
>  fs/Kconfig     |    2 ++
>  fs/nfs/Kconfig |    2 +-
>  2 files changed, 3 insertions(+), 1 deletion(-)
> 
> --- linux-next-20090428.orig/fs/Kconfig
> +++ linux-next-20090428/fs/Kconfig
> @@ -226,10 +226,12 @@ source "fs/nfsd/Kconfig"
>  
>  config LOCKD
>  	tristate
> +	depends on FILE_LOCKING
>  
>  config LOCKD_V4
>  	bool
>  	depends on NFSD_V3 || NFS_V3
> +	depends on FILE_LOCKING
>  	default y
>  
>  config EXPORTFS
> --- linux-next-20090428.orig/fs/nfs/Kconfig
> +++ linux-next-20090428/fs/nfs/Kconfig
> @@ -1,6 +1,6 @@
>  config NFS_FS
>  	tristate "NFS client support"
> -	depends on INET
> +	depends on INET && FILE_LOCKING
>  	select LOCKD
>  	select SUNRPC
>  	select NFS_ACL_SUPPORT if NFS_V3_ACL

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-04-28 21:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20090428165343.2e357d7a.sfr@canb.auug.org.au>
2009-04-28 15:22 ` [PATCH] lockd: fix FILE_LOCKING=n build error Randy Dunlap
2009-04-28 15:38   ` Felix Blyakher
2009-04-28 17:21   ` J. Bruce Fields
2009-04-28 17:51     ` Randy Dunlap
2009-04-28 18:15       ` Trond Myklebust
2009-04-28 21:01         ` [PATCH v2] " Randy Dunlap
2009-04-28 21:40           ` J. Bruce Fields

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).