Subject: Re: linux-next: build warning after merge of the vfs-brauner tree

From: Stephen Rothwell <[email-masked]>
Date: Tue, 1 Oct 2024 14:19:58 +1000

Hi all,

On Tue, 1 Oct 2024 09:11:34 +1000 Stephen Rothwell <[email-masked]> wrote:
>
> After merging the vfs-brauner tree, today's linux-next build (powerpc
> ppc64_defconfig) produced this warning:
> 
> fs/lockd/svclock.c: In function 'nlmsvc_lock':
> fs/lockd/svclock.c:483:34: warning: unused variable 'inode' [-Wunused-variable]
>   483 |         struct inode            *inode = nlmsvc_file_inode(file);
>       |                                  ^~~~~
> 
> Introduced by commit
> 
>   81be05940ccc ("NLM/NFSD: Fix lock notifications for async-capable filesystems")

This became a build failure in my i386 defconfig build, so I applied
the following patch for today.

From: Stephen Rothwell <[email-masked]>
Date: Tue, 1 Oct 2024 14:12:15 +1000
Subject: [PATCH] fix up for "NLM/NFSD: Fix lock notifications for async-capable filesystems'

from the vfs-brauner tree.

Signed-off-by: Stephen Rothwell <[email-masked]>
---
 fs/lockd/svclock.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
index cbb87455a66d..2359347c9fbd 100644
--- a/fs/lockd/svclock.c
+++ b/fs/lockd/svclock.c
@@ -480,7 +480,7 @@ nlmsvc_lock(struct svc_rqst *rqstp, struct nlm_file *file,
 	    struct nlm_host *host, struct nlm_lock *lock, int wait,
 	    struct nlm_cookie *cookie, int reclaim)
 {
-	struct inode		*inode = nlmsvc_file_inode(file);
+	struct inode		*inode __maybe_unused = nlmsvc_file_inode(file);
 	struct nlm_block	*block = NULL;
 	int			error;
 	int			mode;
-- 
2.45.2

-- 
Cheers,
Stephen Rothwell