Skip to contentSkip to conversation

NFSD: make symbol 'nfsd_notifier_lock' static

PATCH In review Wei Yongjun 4 participants 6 messages Nov 30, 2021 – Dec 3, 2021

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 NFSD: make symbol 'nfsd_notifier_lock' static

The sparse tool complains as follows:

fs/nfsd/nfssvc.c:437:1: warning:
symbol 'nfsd_notifier_lock' was not declared. Should it be static?

This symbol is not used outside of nfssvc.c, so marks it static.

Fixes 6ac25fbcbde9 ("NFSD: simplify locking for network notifier.")
---
 fs/nfsd/nfssvc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfssvc.c +1 -1
index 070525fbc1ad..14c1ef6f8cc7 100644
@@ -434,7 +434,7 @@ static void nfsd_shutdown_net(struct net *net)
 	nfsd_shutdown_generic();
 }
 
-DEFINE_SPINLOCK(nfsd_notifier_lock);
+static DEFINE_SPINLOCK(nfsd_notifier_lock);
 static int nfsd_inetaddr_event(struct notifier_block *this, unsigned long event,
 	void *ptr)
 {
#1 lore raw
Quoted 24 lines · Wei Yongjun

The sparse tool complains as follows:

fs/nfsd/nfssvc.c:437:1: warning:
symbol 'nfsd_notifier_lock' was not declared. Should it be static?

This symbol is not used outside of nfssvc.c, so marks it static.

Fixes 6ac25fbcbde9 ("NFSD: simplify locking for network notifier.")

---
fs/nfsd/nfssvc.c | 2 +-

1 file changed, 1 insertion(+), 1 deletion(-)
fs/nfsd/nfssvc.c +0 -0
index 070525fbc1ad..14c1ef6f8cc7 100644

fs/nfsd/nfssvc.c static void nfsd_shutdown_net(struct net *net) · line 440

Quoted 8 lines
fs/nfsd/nfssvc.c +1 -1
@@ -434,7 +434,7 @@ static void nfsd_shutdown_net(struct net *net)
 	nfsd_shutdown_generic();
 }
 
-DEFINE_SPINLOCK(nfsd_notifier_lock);
+static DEFINE_SPINLOCK(nfsd_notifier_lock);
 static int nfsd_inetaddr_event(struct notifier_block *this, unsigned long event,
 	void *ptr)
 {

Thanks! This was pushed to the tip of the for-next branch at

https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git

I removed the Fixes: line because a backport is unnecessary, and the commit ID is not yet permanent.

--
Chuck Lever

#2 lore raw
Quoted 10 lines · Chuck Lever III
Quoted 7 lines
fs/nfsd/nfssvc.c +1 -1
-DEFINE_SPINLOCK(nfsd_notifier_lock);
+static DEFINE_SPINLOCK(nfsd_notifier_lock);

static int nfsd_inetaddr_event(struct notifier_block *this, unsigned long event,
void *ptr)
{

Thanks! This was pushed to the tip of the for-next branch at

Quoted 4 lines

https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git

I removed the Fixes: line because a backport is unnecessary, and the commit ID is not yet permanent.

Removing the tag, makes it more complicated for backporters. Before they could tell automatically from the Fixes tag that backporting was not necessary.

On the other hand, does this patch really need a Fixes tag since it's not a runtime bug? Different maintainers take different sides in that argument.

If the patch needed a fixes tag then a lot of maintainers have scripts to update the tag during a rebase. There are also automated tool run on linux-next which emails a warning when the Fixes tags point to an invalid hash.

regards,
dan carpenter

#3 lore raw
Quoted 24 lines · Dan Carpenter
Quoted 10 lines · Chuck Lever III
Quoted 7 lines
fs/nfsd/nfssvc.c +1 -1
-DEFINE_SPINLOCK(nfsd_notifier_lock);
+static DEFINE_SPINLOCK(nfsd_notifier_lock);

static int nfsd_inetaddr_event(struct notifier_block *this, unsigned long event,
void *ptr)
{

Thanks! This was pushed to the tip of the for-next branch at

Quoted 4 lines

https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git

I removed the Fixes: line because a backport is unnecessary, and the commit ID is not yet permanent.

Removing the tag, makes it more complicated for backporters. Before they could tell automatically from the Fixes tag that backporting was not necessary.

Quoted 8 lines

On the other hand, does this patch really need a Fixes tag since it's not a runtime bug? Different maintainers take different sides in that argument.

If the patch needed a fixes tag then a lot of maintainers have scripts to update the tag during a rebase. There are also automated tool run on linux-next which emails a warning when the Fixes tags point to an invalid hash.

Hi Dan, the patch fixes a bug in my for-next branch, not in mainline. There's really no need for a Fixes: tag.

--
Chuck Lever

#4 lore raw
Quoted 28 lines · Chuck Lever III
Quoted 28 lines · Dan Carpenter
Quoted 10 lines · Chuck Lever III
Quoted 7 lines
fs/nfsd/nfssvc.c +1 -1
-DEFINE_SPINLOCK(nfsd_notifier_lock);
+static DEFINE_SPINLOCK(nfsd_notifier_lock);

static int nfsd_inetaddr_event(struct notifier_block *this, unsigned long event,
void *ptr)
{

Thanks! This was pushed to the tip of the for-next branch at

Quoted 4 lines

https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git

I removed the Fixes: line because a backport is unnecessary, and the commit ID is not yet permanent.

Removing the tag, makes it more complicated for backporters. Before they could tell automatically from the Fixes tag that backporting was not necessary.

On the other hand, does this patch really need a Fixes tag since it's not a runtime bug? Different maintainers take different sides in that argument.

Quoted 7 lines
Quoted 4 lines

If the patch needed a fixes tag then a lot of maintainers have scripts to update the tag during a rebase. There are also automated tool run on linux-next which emails a warning when the Fixes tags point to an invalid hash.

Hi Dan, the patch fixes a bug in my for-next branch, not in mainline. There's really no need for a Fixes: tag.

Assuming it doesn't get folded into the fixed patch before going upstream, it'd be useful information to have there.

--b.

#5 lore raw
Quoted 38 lines · Bruce Fields
Quoted 33 lines · Chuck Lever III
Quoted 32 lines · Dan Carpenter
Quoted 10 lines · Chuck Lever III
Quoted 7 lines
fs/nfsd/nfssvc.c +1 -1
-DEFINE_SPINLOCK(nfsd_notifier_lock);
+static DEFINE_SPINLOCK(nfsd_notifier_lock);

static int nfsd_inetaddr_event(struct notifier_block *this, unsigned long event,
void *ptr)
{

Thanks! This was pushed to the tip of the for-next branch at

Quoted 4 lines

https://git.kernel.org/pub/scm/linux/kernel/git/cel/linux.git

I removed the Fixes: line because a backport is unnecessary, and the commit ID is not yet permanent.

Removing the tag, makes it more complicated for backporters. Before they could tell automatically from the Fixes tag that backporting was not necessary.

On the other hand, does this patch really need a Fixes tag since it's not a runtime bug? Different maintainers take different sides in that argument.

If the patch needed a fixes tag then a lot of maintainers have scripts to update the tag during a rebase. There are also automated tool run on linux-next which emails a warning when the Fixes tags point to an invalid hash.

Quoted 5 lines
Quoted 2 lines

Hi Dan, the patch fixes a bug in my for-next branch, not in mainline. There's really no need for a Fixes: tag.

Assuming it doesn't get folded into the fixed patch before going upstream, it'd be useful information to have there.

I'm sorry, but I don't see how that information is useful for a fixing a patch that is in the same merge set. I'll fold it in.

--
Chuck Lever